Fix Sphinx theme installation in workflow #6
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 Sphinx Docs | |
| on: | |
| push: | |
| branches: [ main ] | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install project and doc tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install sphinx sphinx_rtd_theme | |
| - name: Build Sphinx HTML | |
| run: | | |
| sphinx-build -b html docs/source docs/build/html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/build/html | |
| publish_branch: gh-pages | |
| destination_dir: docs |