Skip to content

Preserve mdbook build failures in CI - #7637

Open
0xjc65eth wants to merge 2 commits into
FuelLabs:masterfrom
0xjc65eth:ci-mdbook-preserve-exit-code
Open

Preserve mdbook build failures in CI#7637
0xjc65eth wants to merge 2 commits into
FuelLabs:masterfrom
0xjc65eth:ci-mdbook-preserve-exit-code

Conversation

@0xjc65eth

Copy link
Copy Markdown

Summary

  • make mdbook CI steps use pipefail when teeing build output
  • build docs/book and docs/reference once each while keeping logs visible in the job output
  • remove grep-based ERROR handling that could miss non-ERROR failures or mask command status

Why
The mdbook build job was piping output through tee without preserving the mdbook exit code, and the reference book was built twice. If mdbook failed without a matching ERROR line, the step could still exit successfully or make the failure harder to diagnose.

Testing

@0xjc65eth
0xjc65eth requested a review from a team as a code owner May 26, 2026 13:50
@cursor

cursor Bot commented May 26, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Only .github/workflows/ci.yml changes in the docs build job; no application or auth logic.

Overview
Updates the build-mdbook job so doc builds fail reliably and run once per book.

The old steps piped mdbook build through tee without pipefail, then treated success as “no ERROR in the log.” That could let real mdbook failures slip through when output didn’t match that pattern. The reference book was also built twice (once discarded, once captured).

Each book now has a dedicated step (docs/book with strict forc-documenter, docs/reference) using set -o pipefail and tee to /tmp/mdbook-*.log, so the step fails on mdbook’s exit code while logs stay in the job output.

Reviewed by Cursor Bugbot for commit a572e46. Bugbot is set up for automated code reviews on this repo. Configure here.

@fuel-cla-bot

fuel-cla-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @0xjc65eth to sign the Fuel Labs Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant