doc: doc update #67
This file contains 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: Deploy documentation to Pages | |
on: | |
push: | |
branches: [main] | |
paths: ['docs/**'] | |
# Enable this workflow to be triggered manually from the Actions tab | |
workflow_dispatch: | |
# Set permissions of the GITHUB_TOKEN to allow deployment to Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run | |
# in-progress and latest queued. However, do NOT cancel in-progress runs. | |
concurrency: | |
group: pages | |
cancel-in-progress: false | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# TODO: Use Nix to improve reproducibility | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
# python-version-file: 'pyproject.toml' | |
python-version: '3.11' | |
- name: Install dependencies | |
# TODO: https://github.com/pypa/pip/issues/11440 | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install .[docs] | |
- name: Build documentation | |
# TODO: https://github.com/pydata/pydata-sphinx-theme/issues/1643 | |
run: > | |
sphinx-build | |
-b dirhtml ./docs ./build/docs | |
-vv | |
--jobs=auto | |
--show-traceback | |
--keep-going | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './build/docs/' | |
# Deployment job | |
deploy: | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |