Repository navigation
docs: refresh project entry points #39
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: Documentation checks | |
| on: | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "examples/**" | |
| - ".github/workflows/docs-checks.yaml" | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "examples/**" | |
| - ".github/workflows/docs-checks.yaml" | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| verify: | |
| name: Build and verify documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Install documentation dependencies | |
| run: npm ci --prefix docs | |
| - name: Type-check documentation code | |
| run: npm run typecheck --prefix docs | |
| - name: Build the documentation site | |
| run: npm run build --prefix docs | |
| - name: Verify repository-owned documentation links | |
| run: npm run check:links --prefix docs | |
| - name: Upload GitHub Pages artifact | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/build | |
| deploy: | |
| name: Deploy documentation to GitHub Pages | |
| needs: verify | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy GitHub Pages artifact | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |