From 286729514e44e0c49ff0ac04592db72b3cd7ad3a Mon Sep 17 00:00:00 2001 From: Rob Esker Date: Wed, 22 Apr 2026 21:35:31 -0500 Subject: [PATCH] fix(ci): include docs/ in Fern preview artifact The Fern preview Comment workflow has been failing on every PR with `fern generate --docs --preview` returning exit 1. Root cause: the Build workflow uploads only `fern/` and `preview-metadata/` as the artifact, but `fern/docs.yml` references `../docs/index.yml`, so when the Comment workflow downloads the artifact and runs `fern generate --docs`, the relative path doesn't resolve and the generate step fails. Adding `docs/` to the upload-artifact path list makes both directories available to the Comment workflow without changing its secret-isolation boundary (it still never checks out the PR branch directly). Verified against the NVSentinel fern pipeline, which uploads both `fern/` and `docs/` and produces working preview comments on its PRs. Signed-off-by: Rob Esker --- .github/workflows/fern-docs-preview-build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fern-docs-preview-build.yml b/.github/workflows/fern-docs-preview-build.yml index 68ccee08..2ac8d98b 100644 --- a/.github/workflows/fern-docs-preview-build.yml +++ b/.github/workflows/fern-docs-preview-build.yml @@ -15,8 +15,11 @@ # Workflow 1 of 2 for Fern doc previews. # -# Collects the fern/ sources and PR metadata from the PR branch and uploads -# them as an artifact. No secrets are used here. +# Collects the fern/ and docs/ sources plus PR metadata from the PR branch and +# uploads them as an artifact. Both directories are needed because +# fern/docs.yml references ../docs/index.yml; omitting docs/ causes +# `fern generate --docs` to fail in the companion workflow. No secrets are +# used here. # # Triggers on push to pull-request/ branches (NVIDIA copy-PR-bot pattern). # On push events github.head_ref and github.event.pull_request.number are @@ -63,5 +66,6 @@ jobs: name: fern-preview path: | fern/ + docs/ preview-metadata/ retention-days: 1