add sphinx tests; compare to .azure-pipelines/templates/steps/sphinx-steps.yml which is still needed for other pipelines on azure

This commit is contained in:
Erica Portnoy
2026-04-17 14:39:01 -07:00
parent 9086feb49a
commit d2c39a3980
+37
View File
@@ -0,0 +1,37 @@
name: Sphinx steps
on:
workflow_call:
permissions:
contents: read
jobs:
test_sphinx_builds:
name: Build Sphinx Documentation
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v6.0.2
- name: Build Sphinx Documentation
run: |-
set -e
sudo apt-get update
sudo apt-get install -y --no-install-recommends libaugeas-dev
FINAL_STATUS=0
declare -a FAILED_BUILDS
tools/venv.py
source venv/bin/activate
for doc_path in */docs
do
echo ""
echo "##[group]Building $doc_path"
if ! sphinx-build -W --keep-going -b html $doc_path $doc_path/_build/html; then
FINAL_STATUS=1
FAILED_BUILDS[${#FAILED_BUILDS[@]}]="${doc_path%/docs}"
fi
echo "##[endgroup]"
done
if [[ $FINAL_STATUS -ne 0 ]]; then
echo "##[error]The following builds failed: ${FAILED_BUILDS[*]}"
exit 1
fi
shell: bash