Merge pull request #157 from mattdavis90/dependabot/github_actions/ac… #224
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: Generate Documentation | |
| on: | |
| push: | |
| branches: ["master"] | |
| paths: | |
| - src/** | |
| - package.json | |
| - README.md | |
| - .github/workflows/docs.yaml | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Generate Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup build environment | |
| uses: ./.github/actions/setup | |
| - name: Generate documentation | |
| shell: bash | |
| run: pnpm run build:docs | |
| - name: Archive documentation | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: docs | |
| path: | | |
| docs/ | |
| deploy: | |
| name: Deploy Documentation | |
| needs: build | |
| if: github.ref == 'refs/heads/master' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download generated documentation | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: docs | |
| path: docs/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: docs/ | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |