Upgrade docs dependencies #28
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: Sphinx build | |
on: | |
workflow_dispatch: | |
inputs: | |
doc_format: | |
description: 'Extension to parse docstrings' | |
required: true | |
default: 'numpydoc' | |
type: choice | |
options: | |
- numpydoc | |
- napoleon | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -r docs/requirements.txt | |
- name: Build HTML | |
run: make html | |
working-directory: docs | |
env: | |
doc_format: ${{ inputs.doc_format }} | |
- name: Upload artifacts | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: docs/_build/html/ | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |