Deploy DocFX to GitHub Pages #28
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: Deploy DocFX to GitHub Pages | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| dotnet-quality: 'preview' | |
| - name: Configure GitHub Packages source | |
| run: | | |
| dotnet nuget add source \ | |
| "https://nuget.pkg.github.com/Payroll-Engine/index.json" \ | |
| --name github --username github-actions \ | |
| --password ${{ secrets.PAT_DISPATCH }} \ | |
| --store-password-in-clear-text | |
| - name: Build | |
| run: dotnet publish Client.Scripting/PayrollEngine.Client.Scripting.csproj -c Release -o publish | |
| - name: Install DocFX | |
| run: dotnet tool install -g docfx | |
| - name: Build DocFX | |
| run: cd docfx && docfx docfx.json | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docfx/_site | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |