Skip to content

separate doc page per version #56

separate doc page per version

separate doc page per version #56

Workflow file for this run

name: Sphinx build
on:
push:
branches: # include master and release branches
- master
- 'release/*'
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: write
#runs-on: self-hosted
env:
AGENT_TOOLSDIRECTORY: /usr/local/bin/
steps:
- uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Update pip
run: |
python -m pip install --upgrade pip
pip install wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install the package your documenting together with its dependencies.
run: |
pip install --no-build-isolation .
- name: Install the building dependencies.
# With higher version of docutils bullet lists does not work
run: |
pip install sphinx furo autodocsumm
# Build documentation for each release branch in a directory named after the branch.
- name: Build the sphinx documentation and posts warnings as github comments.
run: cd docs && sphinx-build -b html . _build/html
- name: Extract branch name
id: extract-branch
run: echo "::set-output name=branch_name::$(echo ${GITHUB_REF#refs/heads/} | tr / _)"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# publish dir is of the form docs/_build/html_<branch_name>
publish_dir: docs/_build/html
# Destination directory in the gh-pages branch
destination_dir: ${{ steps.extract-branch.outputs.branch_name }}