Skip to content

ci(docs): publish versioned Fern docs on release#1541

Closed
mesutoezdil wants to merge 1 commit into
NVIDIA:mainfrom
mesutoezdil:feat/versioned-fern-docs
Closed

ci(docs): publish versioned Fern docs on release#1541
mesutoezdil wants to merge 1 commit into
NVIDIA:mainfrom
mesutoezdil:feat/versioned-fern-docs

Conversation

@mesutoezdil
Copy link
Copy Markdown
Contributor

@mesutoezdil mesutoezdil commented May 23, 2026

After each release, fern generate --docs publishes to latest.
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 --version flag creates a new version entry on the Fern site using the tag as the slug. Requires FERN_TOKEN to verify end-to-end; the existing fern check step in branch-docs.yml validates the config locally.

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
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 23, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@johntmyers
Copy link
Copy Markdown
Collaborator

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?

@mesutoezdil
Copy link
Copy Markdown
Contributor Author

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

@pimlock
Copy link
Copy Markdown
Collaborator

pimlock commented May 25, 2026

@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

@mesutoezdil
Copy link
Copy Markdown
Contributor Author

@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,
--version is documented for sdk generation, not for fern generate --docs.

i don't have a documented source confirming that this flag
combination creates a versioned docs snapshot
i was working from an assumption that isn't backed by the fern docs

the documented approach for docs versioning is config-based: version-specific
.yml files under fern/versions/ with entries in docs.yml, then a plain fern generate --docs

i'd rather close this pr than merge sth with unverified behavior.
i can open a follow-up that uses the documented config approach or validates
the flag behavior with fern directly first.

@pimlock
Copy link
Copy Markdown
Collaborator

pimlock commented May 25, 2026

i'd rather close this pr than merge sth with unverified behavior.
i can open a follow-up that uses the documented config approach or validates
the flag behavior with fern directly first.

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.

@pimlock
Copy link
Copy Markdown
Collaborator

pimlock commented May 26, 2026

@mesutoezdil here's the proposed structure that will allow for multiple versions of docs to be published: #1296 (comment)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(docs): publish versioned Fern docs for releases

3 participants