Merge pull request #343 from funkelab/pre-commit-ci-update-config #137
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 build | |
| # build the documentation whenever there are new commits on main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| # security: restrict permissions for CI jobs. | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Build the documentation and upload the static HTML files as an artifact. | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python 3.11 | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: '3.11' | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Build docs | |
| run: | | |
| cd docs/ | |
| uv run make html | |
| - uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: docs/build/html | |
| # Deploy the artifact to GitHub pages. | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |