ci(docs): publish versioned Fern docs on release#1541
Conversation
After publishing latest, also publish a version-tagged snapshot using `fern generate --docs --version "$RELEASE_TAG"`. RELEASE_TAG is already resolved at workflow scope (inputs.tag or github.ref_name, e.g. v0.0.47). Closes NVIDIA#1296
|
Curious if we can keep the last N versions around, instead of all of them. Maybe the last 10. But users should be upgrading routinely as we are still in Alpha. For the instances where we have major breaking changes and paused releases a last N approach should suffice IMO. @drew was your original ticket intended to keep every version published indefinitely? |
Apologies for jumping in: the original ticket mentions "recent tagged releases" in the version selector, so a last-N cap aligns with the intent. I can add a max versions limit if you decide on a number |
|
@mesutoezdil do you have a reference to where this flag is documented? I'm checking Fern docs and the only place I can see it refers to package version (i.e. their SDK) and not docs: https://buildwithfern.com/learn/cli-api-reference/cli-reference/commands#version AFAIK docs versioning works differently, see here: https://buildwithfern.com/learn/docs/configuration/versions |
y r right to flag this. after re-viewing the cli reference more carefully, i don't have a documented source confirming that this flag the documented approach for docs versioning is config-based: version-specific i'd rather close this pr than merge sth with unverified behavior. |
Thanks for checking. Closing this PR sounds good. I've looked into extending our docs last week, so I'm going to take a pass at it. First, I'm going to add a plan into the issue and I will ping you if you're interested in reviewing it (likely later today/tomorrow). I also marked that issue as assigned to me, so it's clear it's being worked on. |
|
@mesutoezdil here's the proposed structure that will allow for multiple versions of docs to be published: #1296 (comment) |
After each release,
fern generate --docspublishes tolatest.This PR adds a second call that also publishes a version-tagged snapshot so users on older installs can find docs that match their version.
Related Issue: Closes #1296
Testing
Workflow-only change. The
fern generate --docs --versionflag creates a new version entry on the Fern site using the tag as the slug. RequiresFERN_TOKENto verify end-to-end; the existingfern checkstep inbranch-docs.ymlvalidates the config locally.