Skip to content

Docs

Docs #4

Workflow file for this run

name: Docs
on:
workflow_dispatch:
inputs:
publish:
default: false
type: boolean
version:
default: ''
required: false
type: string
branch:
description: 'Branch/tag with documentation source. If not set, the current branch will be used.'
default: ''
required: false
type: string
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
workflow_call:
inputs:
publish:
default: false
type: boolean
version:
default: ''
required: false
type: string
branch:
description: 'Branch/tag with documentation source. If not set, the current branch will be used.'
default: ''
required: false
type: string
linkcheck:
description: 'Run the link checker. If not set the link checker will not be run.'
default: false
required: false
type: boolean
env:
VERSION: ${{ inputs.version }}
jobs:
docs:
name: Build documentation
runs-on: 'ubuntu-24.04'
env:
ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }}
ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }}
steps:
- run: sudo apt install --yes graphviz pandoc
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch == '' && github.ref_name || inputs.branch }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0 # history required so cmake can determine version
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- run: tox -e releasedocs -- "${VERSION}"
if: ${{ inputs.version != '' }}
- run: tox -e docs
if: ${{ inputs.version == '' }}
- run: tox -e linkcheck
if: ${{ inputs.linkcheck }}
- uses: actions/upload-artifact@v4
with:
name: docs_html
path: html/
- uses: JamesIves/[email protected]
if: ${{ inputs.publish }}
with:
branch: gh-pages
folder: html
single-commit: true