diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45ee59a16..1d2ac5bf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,18 @@ jobs: - name: Build Download Notebooks (sphinx-tojupyter) shell: bash -l {0} run: | + # This is the FIRST `jb build` in the workflow, and `execute_notebooks: "cache"` + # means only the first build actually executes notebooks — the later HTML build + # reads the cache. So this is the step where a CellExecutionError surfaces, and + # therefore the step that has to gate. + # + # `set -eo pipefail` is required as well as `-W`: `shell: bash -l {0}` is a + # custom shell spec, so GitHub does not inject `-eo pipefail` (it only does + # that for the bare `shell: bash` shorthand). Without it a failing `jb build` + # would be masked by the trailing mkdir/cp, whose exit code becomes the + # step's — and `--keep-going` guarantees the .ipynb files exist for `cp` + # to succeed on. + set -eo pipefail jb build lectures -n -W --keep-going --path-output ./ --builder=custom --custom-builder=jupyter mkdir -p _build/html/_notebooks cp -u _build/jupyter/*.ipynb _build/html/_notebooks