Fail workflow on documentation build failures #502
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The documentation-build script did not propagate failures from individual lines, which meant that a failure in the script could still result in an attempted empty deployment, which deletes the whole website. This ensures that the bash script propagates the failure through to the workflow status, so the deployment does not trigger.
We also fix the failure that took out the website last time - a missing transitive dependency (which isn't our fault, but is easy to work around).
Details and comments
Since I was at it, and apparently I hooked
shellcheck
in to vim at some point, I quoted the argument expansions it was moaning about.I ran a dummy run of this commit with the deployment replaced with an artefact upload on my fork, which you can see ran successfully here: https://github.com/jakelishman/openqasm/actions/runs/7211750781.