diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae12c331..913a7ff1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,6 +80,14 @@ jobs: run: make -C docs html SPHINXOPTS="-W --keep-going" - name: Add .nojekyll to the build run: touch docs/_build/html/.nojekyll + # The deploy below is force_orphan, so it replaces the whole site. Refuse + # to publish a build that did not actually produce one. + - name: Verify the build produced a site + run: | + set -e + test -s docs/_build/html/index.html + test -s docs/_build/html/auto_examples/index.html + echo "$(find docs/_build/html -name '*.html' | wc -l) HTML pages built" - name: Upload documentation artifact uses: actions/upload-artifact@v6 with: diff --git a/docs/conf.py b/docs/conf.py index 9b9aa0bd..a66ab267 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -63,6 +63,9 @@ "../examples/zapline", "../examples/asr", "../examples/spectrum_interpolation", + # Trailing wildcard: a new examples/ subdirectory sorts to the end + # instead of failing the whole docs build with a ConfigError. + "*", ] ), "within_subsection_order": FileNameSortKey,