2022-02-09 17:30:16 +01:00
|
|
|
name: Test Documentation Build
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- doc-fixes
|
|
|
|
push:
|
2022-12-31 16:59:49 +01:00
|
|
|
branches:
|
2022-02-09 17:30:16 +01:00
|
|
|
- master
|
|
|
|
- doc-fixes
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test-sphinx-build:
|
|
|
|
name: test-sphinx-build
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-12-31 16:59:49 +01:00
|
|
|
python-version: [3.9]
|
2022-02-09 17:30:16 +01:00
|
|
|
os: [ubuntu-latest]
|
|
|
|
fail-fast: False
|
|
|
|
steps:
|
2023-10-02 20:20:28 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-02-09 17:30:16 +01:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-01-03 16:43:35 +01:00
|
|
|
uses: actions/setup-python@v5
|
2022-02-09 17:30:16 +01:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2023-01-06 08:13:20 +01:00
|
|
|
cache: 'pip'
|
|
|
|
cache-dependency-path: '**/requirements*.txt'
|
2022-02-09 17:30:16 +01:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -W ignore -m pip install --upgrade pip
|
2022-08-26 06:50:03 +02:00
|
|
|
python -W ignore -m pip install -r requirements-all.txt
|
2023-02-05 18:09:55 +01:00
|
|
|
- name: Test autogeneration of admonitions
|
|
|
|
run: pytest -v --tb=short tests/docs/admonition_inserter.py
|
2022-02-09 17:30:16 +01:00
|
|
|
- name: Build docs
|
|
|
|
run: sphinx-build docs/source docs/build/html -W --keep-going -j auto
|
2023-01-06 08:14:09 +01:00
|
|
|
- name: Upload docs
|
2024-01-03 16:41:03 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-01-06 08:14:09 +01:00
|
|
|
with:
|
|
|
|
name: HTML Docs
|
|
|
|
retention-days: 7
|
|
|
|
path: |
|
|
|
|
# Exclude the .doctrees folder and .buildinfo file from the artifact
|
|
|
|
# since they are not needed and add to the size
|
|
|
|
docs/build/html/*
|
|
|
|
!docs/build/html/.doctrees
|
|
|
|
!docs/build/html/.buildinfo
|