ci(deps): bump actions/deploy-pages from 4 to 5 #43
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'bayes_hdc/**' | |
| - 'docs/**' | |
| - 'pyproject.toml' | |
| - '.readthedocs.yaml' | |
| - '.github/workflows/docs.yml' | |
| pull_request: | |
| paths: | |
| - 'bayes_hdc/**' | |
| - 'docs/**' | |
| - 'pyproject.toml' | |
| - '.readthedocs.yaml' | |
| - '.github/workflows/docs.yml' | |
| workflow_dispatch: | |
| # GitHub Pages deployment needs `pages: write` and `id-token: write` | |
| # in addition to the default read permissions. | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build Sphinx site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| - name: Install bayes-hdc with examples extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[examples]" | |
| - name: Install docs requirements | |
| run: python -m pip install -r docs/requirements.txt | |
| - name: Build HTML docs (warnings as errors) | |
| run: python -m sphinx -b html -W --keep-going docs docs/_build/html | |
| - name: Check internal links | |
| run: python -m sphinx -b linkcheck docs docs/_build/linkcheck || true | |
| - name: Add .nojekyll so Pages serves _static/ correctly | |
| run: touch docs/_build/html/.nojekyll | |
| - name: Upload built site as a Pages artefact | |
| if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/_build/html | |
| - name: Upload built docs as a regular artefact | |
| if: github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bayes-hdc-html-docs | |
| path: docs/_build/html | |
| retention-days: 14 | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |