Skip to content

Fix bugs in documentation build #5

Fix bugs in documentation build

Fix bugs in documentation build #5

Workflow file for this run

name: Build docs
on:
pull_request:
branches:
- main
paths:
- "docs/**"
- "+**/*.m"
- ".github/workflows/build_docs.yml"
push:
branches:
- main
paths:
- "docs/**"
- "+**/*.m"
- ".github/workflows/build_docs.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_docs:
name: Build Sphinx docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Remove folders not needed for docs build
run: rm -rf +tests tools tutorials # not part of published API docs; fewer .m files for autodoc to scan
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -r docs/requirements.txt
- name: Apply RTD-equivalent pre-build customizations
run: python docs/source/sphinx_extensions/copy_files.py
- name: Build docs (fail on any warning)
run: sphinx-build -b html -W --keep-going docs/source docs/build/html