Skip to content

New version 2.1.5 (#349) #82

New version 2.1.5 (#349)

New version 2.1.5 (#349) #82

Workflow file for this run

name: docs.yml
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
on:
# Only run on pushes to master for documentation-related changes
# This prevents running on every commit, only when docs actually change
push:
branches:
- master
paths:
- 'docs/**'
- '.readthedocs.yaml'
# Manual trigger for immediate updates (e.g., after releases)
workflow_dispatch: {}
jobs:
build-and-deploy:
defaults:
run:
shell: bash
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master'
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
steps:
- name: Check out GitHub repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 1
ref: ${{ (github.event_name == 'workflow_dispatch' && github.ref) || github.sha }}
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
id: setup_python
with:
python-version-file: '.python-version'
- name: Manage Poetry cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
with:
path: |
~/.cache/pypoetry/cache
~/.cache/pypoetry/artifacts
key: poetry-cache-${{ runner.os }}-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-cache-${{ runner.os }}-
- name: Create virtual environment and install Poetry
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install poetry==2.2.1
- name: Install dependencies with Poetry
run: |
. venv/bin/activate
poetry install --with docs
- name: Build documentation
run: |
. venv/bin/activate
cd docs
make builddocs
- name: Check for documentation warnings
run: |
. venv/bin/activate
cd docs
# Build with warnings as errors to catch issues
make strict || {
echo "Documentation build failed with warnings/errors:"
echo "This indicates potential issues that should be fixed."
exit 1
}
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: docs/build/html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5