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:
|
2022-05-05 09:27:54 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-09 17:30:16 +01:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2022-07-07 23:21:20 +02:00
|
|
|
uses: actions/setup-python@v4
|
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
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
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
|