| name: Build documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: "Set up Python 3.10" | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -e ".[dev]" | |
| - name: Build | |
| run: | | |
| jupyter-book build docs | |
| - name: Copy extras | |
| run: | | |
| cp -r docs/_extras/* 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 | |