Skip to content

documentation

documentation #58

Workflow file for this run

name: documentation
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
doctest:
name: Test if documentation can be rendered
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install package and sphinx
run: |
pip install .
pip install sphinx>=4.5 sphinx-book-theme pytest sphinx_gallery plotly
sphinx-build -b doctest doc .
docdeploy:
name: Render the documentation and push it to gh-pages
runs-on: ubuntu-latest
needs: doctest
if: ${{github.ref == 'refs/heads/main'}}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install package and sphinx
run: |
pip install .
pip install sphinx>=4.5 sphinx-book-theme pytest sphinx_gallery plotly
- name: Sphinx build
run: |
sphinx-build doc _build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true