fix(docs): prevent infinite loop in 404.html redirect #38
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 Documentation | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: [ 'docs/**', 'package.json', 'pnpm-lock.yaml' ] | |
| workflow_dispatch: | |
| inputs: {} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| setup: | |
| uses: ./.github/workflows/setup.yml | |
| with: | |
| rust-version: '1.88' | |
| rust-components: 'rustfmt,clippy' | |
| # Build job | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: setup | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.14.0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| - name: Build documentation | |
| run: npx nx build docs | |
| - name: Copy static index.html | |
| run: cp docs/static/index.html docs/build/index.html | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./docs/build | |
| # Deployment job | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |