update docs python version #22
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: Build and Deploy Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[docs]" # Install package with docs dependencies | |
| - name: Build Documentation | |
| run: | | |
| cd docs | |
| make html | |
| touch build/html/.nojekyll | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: docs/build/html | |
| branch: gh-pages |