Fix docs links #21
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 Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - ".github/workflows/docs.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| env: | |
| UNDOX_REF: v0.1.8 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache undox binary | |
| id: cache-undox | |
| uses: actions/cache@v4 | |
| with: | |
| path: .undox | |
| key: undox-${{ env.UNDOX_REF }}-${{ runner.os }} | |
| - name: Install Rust | |
| if: steps.cache-undox.outputs.cache-hit != 'true' | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install undox from source | |
| if: steps.cache-undox.outputs.cache-hit != 'true' | |
| run: ./docs/scripts/install-undox.sh ${{ env.UNDOX_REF }} | |
| - name: Build docs | |
| run: | | |
| export PATH="$PWD/.undox/bin:$PATH" | |
| cd docs | |
| undox build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/_site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |