Remove large object doc page (#452) #1105
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # Used to trigger the flow from Npgsql/EFCore.PG via HTTP POST | |
| repository_dispatch: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6.3.0 | |
| with: | |
| node-version: 20.x | |
| - name: Run Markdownlint | |
| run: | | |
| echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json" | |
| npm i -g markdownlint-cli | |
| markdownlint "conceptual/**/*.md" | |
| # Setup software | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v5.2.0 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Checkout Npgsql | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: npgsql/npgsql | |
| ref: docs | |
| path: Npgsql | |
| # docfx has issues specifically with analyzer/sourcegen projects; build manually before. | |
| - name: Build Npgsql | |
| run: dotnet build -c Release | |
| shell: bash | |
| working-directory: Npgsql | |
| - name: Checkout EFCore.PG | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: npgsql/Npgsql.EntityFrameworkCore.PostgreSQL | |
| ref: docs | |
| path: EFCore.PG | |
| - name: Build EFCore.PG | |
| run: dotnet build -c Release | |
| shell: bash | |
| working-directory: EFCore.PG | |
| - name: Get docfx | |
| # We temporarily require a nightly biuld of docfx, supporting Roslyn 5.0.0 which Npgsql requires for its analyzer | |
| # (https://github.com/dotnet/docfx/pull/10859#issuecomment-3794308564) | |
| # run: dotnet tool install --version 2.78.4 -g docfx | |
| run: | | |
| # Get the latest nightly version from GitHub Packages | |
| version=$(gh api /orgs/dotnet/packages/nuget/docfx/versions --jq '.[0].name') | |
| echo "Installing docfx version: $version" | |
| # Download the nupkg | |
| downloadUrl="https://nuget.pkg.github.com/dotnet/download/docfx/${version}/${version}.nupkg" | |
| curl -L -H "Authorization: Bearer $GH_TOKEN" -o "docfx.${version}.nupkg" "$downloadUrl" | |
| # Install from local source | |
| dotnet tool update docfx -g --prerelease --add-source . | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build docs | |
| run: docfx --warningsAsErrors | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref_name == 'main' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |