docs: fix Fern versioned publishing#656
Conversation
|
MkDocs preview: https://d08e8095.dd-docs-preview.pages.dev Fern preview: https://nvidia-preview-pr-656.docs.buildwithfern.com/nemo/datadesigner
|
Greptile SummaryThis PR fixes the Fern versioning regression from PR #608 by extracting v0.6.0-specific plugin and dev-note pages from the shared v0.5.8 tree into their own frozen copies, restoring older pages to their experimental-warning wording, and wiring up CI so the release nav snapshot is prepared and validated automatically on GitHub release events.
|
| Filename | Overview |
|---|---|
| fern/scripts/fern-release-version.py | Adds version-comparison helpers, YAML version-entry parsing, and three new checks; logic is correct and edge cases are handled properly. |
| .github/workflows/build-fern-docs.yml | Adds prepare+check steps to check-release-version and publish jobs and introduces sync-release-version-to-main job; flow is correct and idempotent. |
| fern/versions/v0.6.0.yml | New frozen v0.6.0 release nav; plugin sections point at v0.6.0-specific page copies while unchanged sections reuse shared pages. |
| fern/versions/latest.yml | Plugin and dev-note sections now point at v0.6.0-specific page copies; stale ./latest/pages/ dev-note refs are removed. |
| fern/docs.yml | Adds v0.6.0 version entry and updates the Latest display name from v0.5.9 to v0.6.0. |
| fern/versions/v0.5.8.yml | Removes the Have It Your Way dev-note entry, correcting the regression that added a v0.6.0 post to an older release. |
Reviews (4): Last reviewed commit: "ci: automate Fern release sync" | Re-trigger Greptile
PR #656 Review —
|
|
The v0.6.0 release today hit a Fern publish failure, and while debugging that I realized the Fern setup had drifted pretty far from the MkDocs model we were used to. The main thing this PR does is make Fern behave much more like MkDocs did:
Along the way this also fixes a few things that surfaced during the release:
Validation is looking good:
@johnnygreco @nabinchha when you get a chance, could you take a look and sanity-check whether this feels like the right Fern equivalent of our old MkDocs release flow? |
|
Thanks for putting this together, @andreatgretel — moving Fern publishing onto an orphan SummaryThe PR migrates Fern release publishing to a Dynamo-style orphan FindingsWarnings — Worth addressing
Suggestions — Take it or leave it
What Looks Good
VerdictShip it (with nits) — nothing blocking. The skill-doc drift in This review was generated by an AI assistant. |
|
Thanks @nabinchha, this was helpful. I pushed
I left the pytest coverage / helper rename / YAML helper extraction suggestions as follow-ups so this PR does not grow more than it needs to. Validation passed locally:
CI is good now. |
📋 Summary
This PR moves Fern publishing to a Dynamo-style, orphan
docs-websitebranch model.mainnow keeps only latest Fern authoring docs, whiledocs-websiteowns published historical snapshots and stable publish provenance. This fixes the PR #608 regression without requiring release-time cleanup PRs tomain.Current Status
release_tag=v0.6.0andsource_ref=andreatgretel/fix/fern-versioned-docs.docs-websiteto87a0d5e1from source commite1c3f4e6, validated the published branch, and Fern published 329 pages with 0 errors and 12 warnings.https://docs.nvidia.com/nemo/datadesigner, but that NVIDIA edge route currently returns 404; the BuildWithFern host responds athttps://datadesigner.docs.buildwithfern.com/nemo/datadesigner.mainwithrelease_tag=v0.6.0andsource_ref=mainsodocs-websiteprovenance points atmaininstead of this PR branch.🔗 Related Issue
N/A
🔄 Changes
✨ Added
fern/scripts/fern-published-branch.pyto sync source docs intodocs-website, preserve existing published versions, materialize frozen version page copies, and patch Dev Notes into the published latest docs.fern/publish-metadata.jsonondocs-website, with source repository/ref/SHA, release tag when applicable, and published branch.fern-release-version.pyvalidation to catch stale latest labels, misplaced newer-version content, missing nav paths, and latest/release mismatches.build-notebooksworkflow support for checking out a release tag/source ref when release docs are published.🔧 Changed
docs-website, validate them withmake check-fern-docs, commit them, then publish from that branch.docs-websitelatest, validate the branch, commit it, then publish.docs-websitearchive before checking/publishing, so previews show the version picker reviewers will see in production.docs-websitebranch and fails clearly if historical redirect targets are missing.fern/docs.ymlonmainlatest-only and rewritesfern/versions/latest.ymlto point atfern/versions/latest/pages/**.fern/AGENTS.md,fern/README.md,.agents/skills/datadesigner-docs/SKILL.md,CONTRIBUTING.md, andVERSIONING.mdwith the new release and authoring guidance.🗑️ Removed
older,v0.5.8,v0.5.9, andv0.6.0Fern trees frommain.docs-website, which has been converted to an orphan-style publish branch.🔍 Attention Areas
.github/workflows/build-fern-docs.yml- release publishing prepares, validates, commits, and publishes fromdocs-website..github/workflows/publish-fern-devnotes.yml- Dev Notes patching updatesdocs-websitelatest instead of publishing rollingmain..github/workflows/docs-preview.yml- hosted Fern previews use a temporarydocs-websitesnapshot, not the latest-only authoring tree.fern/scripts/fern-published-branch.py- preserves archived versions, materializes frozen page copies, and writes publish metadata.fern/scripts/fern-release-version.py- creates and validates release snapshots on the published branch.fern/scripts/normalize-py2fern-indexes.py- keeps generated API navigation from duplicating section and page labels.fern/docs.ymlandfern/versions/latest.yml- confirmmainis latest-only.fern/AGENTS.md,fern/README.md, and.agents/skills/datadesigner-docs/SKILL.md- document the model future agents should follow.🧪 Testing
.venv/bin/ruff check --fix ..venv/bin/ruff format ..venv/bin/python -m py_compile fern/scripts/fern-published-branch.py fern/scripts/fern-release-version.py fern/scripts/normalize-py2fern-indexes.pydocs-websitepreservation simulation:sync-source+prepare/check --require-latest-matches-releasedocs-websitearchive + PR source sync +make check-fern-docsindex.mdxand hosted preview no longer showsProcessor API > Base > Base-style nestingv0.6.0,v0.5.9, andv0.5.8navs point only at their ownvX.Y.Z/pages/**docs-websitesmoke: branch has no merge base withmain, GitHub Actions can still checkout/sync it, and docs preview passesbuild-and-deploypassedBuild Fern docsrun25838483734from this branch withrelease_tag=v0.6.0,source_ref=andreatgretel/fix/fern-versioned-docs; passed, pusheddocs-websiteto87a0d5e1, and Fern published 329 pages with 0 errors and 12 warningsmake testpasses (N/A - docs-only Fern metadata/content fix)✅ Checklist
Description updated with AI