fix(ci): fix fern preview metadata and add continuous staging publish#546
Merged
dims merged 2 commits intoNVIDIA:mainfrom Apr 11, 2026
Merged
fix(ci): fix fern preview metadata and add continuous staging publish#546dims merged 2 commits intoNVIDIA:mainfrom
dims merged 2 commits intoNVIDIA:mainfrom
Conversation
dims
approved these changes
Apr 11, 2026
yuanchen8911
approved these changes
Apr 11, 2026
Contributor
yuanchen8911
left a comment
There was a problem hiding this comment.
/lgtm
Non-blocking note: the fern-publish concurrency group is shared by both main branch publishes and docs/v* tag publishes, so a rare overlap could cause one to cancel the other. This is low risk because fern generate --docs is idempotent and these events are infrequent. If you want to avoid branch-vs-tag cross-cancellation, consider scoping the group by ref type, e.g. fern-publish-${{ github.ref_type }}.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fix two bugs in the Fern preview CI workflows, add offline link checking, and
extend the publish workflow to continuously deploy staging on docs commits to main.
Motivation / Context
The preview workflow was silently dropping PR metadata (
PR_NUMBERempty,HEAD_REFempty) becauseupload-artifact@v4excludes hidden directories bydefault. A second bug caused a corrupted GitHub API URL when posting the preview
comment. The publish workflow required a manual tag or dispatch to update the
docs site.
Fixes: N/A
Related: N/A
Type of Change
Component(s) Affected
.github/workflows/fern-docs-*.yml,publish-fern-docs.yml)Implementation Notes
.preview-metadata/renamed topreview-metadata/—upload-artifact@v4setsinclude-hidden-files: falseby default, silently excluding the directory fromthe artifact
COMMENT_ID=$(... | tr -d '\r' | head -1)—gh apireturns CRLF output;the trailing
\rwas included in the URL, causingparse "…/comments/{\r": invalid control character in URL--offline(file refs only) to avoid flaky external URL checksfern-publishwithcancel-in-progress: truedropsintermediate jobs on rapid merges to avoid consuming Fern API quota
Testing
CI-only change — no
make qualifyapplicable. Workflows validated viafern check(0 errors) and yamllint (0 errors).Risk Assessment
Rollout notes: N/A
Checklist
make testwith-race)make lint)git commit -S)