Skip to content

Deploy Sphinx documentation to Pages #5

Deploy Sphinx documentation to Pages

Deploy Sphinx documentation to Pages #5

name: Deploy Sphinx documentation to Pages
on:
release:
types: [published]
workflow_dispatch:
jobs:
pages:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python_version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -v -e .
- name: Generate rst
run: |
cd docs/sphinx_doc/
sphinx-apidoc -f -o source ../../data_juicer --templatedir _templates
cd -
- id: deployment
uses: sphinx-notes/pages@v3
with:
documentation_path: ./docs/sphinx_doc/source
python_version: ${{ matrix.python-version }}
publish: false
requirements_path: ./environments/dev_requires.txt
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ steps.deployment.outputs.artifact }}