Skip to content

ci: Add Fern docs preview workflows - #538

Open
mikemckiernan wants to merge 2 commits into
mainfrom
devin/1794604550-fern-preview-ci
Open

mikemckiernan wants to merge 2 commits into
mainfrom
devin/1794604550-fern-preview-ci

Conversation

@mikemckiernan

@mikemckiernan mikemckiernan commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds the Fern preview CI from NVIDIA/docs-builder so that PRs with a fern/ directory, such as #536 and #537, get a hosted Fern preview. The files follow the caller examples in docs-builder/_fern_docs_preview_copy.yml and _fern_docs_preview_delete_copy.yml, and the NIM Operator Fern migration (NVIDIA/k8s-nim-operator#980).

  • .github/copy-pr-bot.yaml (enabled: true): copy-pr-bot copies trusted PR commits to pull-request/<N>.
  • fern-docs-preview-copy.yml: runs on pushes to pull-request/[0-9]+ that touch fern/**, and calls _fern_docs_preview_copy.yml@main with fern-directory: fern. The Fern CLI version comes from fern/fern.config.json.
  • fern-docs-preview-delete-copy.yml: runs on pull_request_target: closed for PRs that touch fern/**, and calls _fern_docs_preview_delete_copy.yml@main, which deletes preview pr-<N>. The paths filter keeps the job from failing on every Sphinx PR close. The job reads fern/fern.config.json from main, and main has no fern/ directory yet.

The existing Sphinx workflows are unchanged. They trigger on pull_request and on push to main, release-* and v* tags, so the pull-request/<N> branches from copy-pr-bot don't trigger them. This PR adds no publish workflow.

Admin setup this PR can't do:

  1. Install the copy-pr-bot GitHub App on NVIDIA/cloud-native-docs.
  2. Add the repo secrets DOCS_FERN_AWS_ROLE_TO_ASSUME and DOCS_FERN_SECRET_ID.
  3. Onboard the repo to the Fern token AWS role's OIDC trust (docs-ci-components fern_token_manager.py). The trust must allow push on refs/heads/pull-request/* for the preview, and pull_request_target on main for the delete.

For review: GitHub has blocked pull_request_target by default in public repos since 2026-11-02, so the delete workflow may not run until the repo allows that trigger. If it doesn't run, the only effect is that stale previews stay up. _fern_docs_preview_delete_copy.yml on docs-builder main still documents pull_request_target, so this PR uses it too.

Link to Devin session: https://nvidia-cloud.devinenterprise.com/sessions/9aa7c0ede21948c58fdb86208d2cde71
Open in Devin Desktop: https://nvidia-cloud.devinenterprise.com/desktop/session/9aa7c0ede21948c58fdb86208d2cde71?variant=devin
Requested by: @mikemckiernan

Signed-off-by: Mike McKiernan <mmckiernan@nvidia.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown

Documentation preview

https://nvidia.github.io/cloud-native-docs/review/pr-538

Signed-off-by: Mike McKiernan <mmckiernan@nvidia.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant