fixup master -> main #11
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 | |
| on: | |
| push: | |
| branches: ["*"] | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| build_sphinx: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup uv project virtual environment | |
| uses: ./.github/actions/setup-uv | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y pandoc | |
| - name: Build documentation | |
| working-directory: docs/ | |
| run: uv run --no-project make html SPHINXOPTS="-W --keep-going" # TODO also use -n in the future | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: docs | |
| path: docs/_build/html | |
| deploy_docs: | |
| needs: [build_sphinx] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download artifacts docs | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: docs | |
| path: public/sphinx/html | |
| - name: Deploy pages | |
| uses: JamesIves/github-pages-deploy-action@v4.7.4 | |
| with: | |
| branch: gh-pages | |
| folder: public | |
| single-commit: true | |
| dry-run: ${{ !(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }} |