fix(ci): populate frozen version content in preview build and surface fern errors#322
Conversation
… fern errors The preview build workflow did not run git archive to populate fern/versions/v0.3.0-content/, causing fern generate --preview to fail with ENOENT on every PR since NVIDIA#316 merged. Add the same git archive step from the publish workflow. Also switch the comment workflow's Generate preview URL step from the OUTPUT=$(fern ... 2>&1) pattern to tee-based streaming so fern errors are visible in the Actions log on failure. Fixes NVIDIA#321 Signed-off-by: Pete MacKinnon <[email protected]>
Greptile SummaryThis PR fixes two independent regressions in the Fern documentation preview pipeline that have been affecting every docs-touching PR since #316. Both fixes align the preview workflows with patterns already established in the publish workflow.
Confidence Score: 5/5Both changes are safe to merge; they restore expected behavior with no new logic beyond what already runs in the publish workflow. The git archive loop is a direct copy of an already-proven pattern, complete with the existing guards for missing tags and the symlink creation for shared assets. The tee-based streaming change is a straightforward fix: output is written to a temp file and also streamed live, the URL is extracted from the file afterward, and the empty-URL guard is preserved. No new failure modes are introduced. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(ci): populate frozen version content..." | Re-trigger Greptile |
Description
Two fixes for the Fern preview pipeline:
Preview build missing frozen version content — Since fix(fern): pin frozen version content via git archive at publish time #316,
fern/versions/v0.3.0.ymlreferencesv0.3.0-content/which is populated bygit archiveat publish time. The preview build workflow (fern-docs-preview-build.yml) did not include this step, so the artifact shipped an empty directory. Every PR touchingdocs/orfern/has been failing preview generation since fix(fern): pin frozen version content via git archive at publish time #316 merged. Adds the samegit archiveloop from the publish workflow.Preview comment swallows fern errors — The
Generate preview URLstep infern-docs-preview-comment.ymlusedOUTPUT=$(fern generate --docs --preview ... 2>&1), which swallows fern's error output on failure (bash -eaborts beforeecho "$OUTPUT"runs). Switches totee-based streaming, matching the pattern already in the publish workflow since docs(fern): restore Reference section, label v0.3.0, surface errors #284.Fixes #321
Checklist
git commit -s).