gh pages workflow update #5
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 # adjust if necessary | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install -y pandoc | |
| pip install -r docs/requirements.txt | |
| pip install . | |
| - name: Build documentation | |
| run: sphinx-build -b html docs docs/_build/html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4.1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/_build/html |