Publish Documentation #65
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
# | |
# Publish Documentation to GitHub pages. | |
# | |
name: Publish Documentation | |
on: | |
release: | |
types: [ published ] | |
# Allows running this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
documentation: | |
name: Publish Documentation | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-docs-${{ hashFiles('setup.cfg') }} | |
restore-keys: | | |
${{ runner.os }}-docs- | |
- name: Install dependencies | |
run: | | |
python -m pip install -e .[docs] | |
- name: Sphinx make | |
run: | | |
cd ./docs | |
make html | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html |