Summary
Since #316 (frozen version content via git archive), the preview build workflow (fern-docs-preview-build.yml) uploads fern/ and docs/ as an artifact, but does not run git archive to populate fern/versions/v0.3.0-content/. That directory is .gitignore'd, so the artifact is empty. The companion comment workflow then fails when fern generate --docs --preview tries to resolve paths in fern/versions/v0.3.0.yml:
ENOENT: no such file or directory, open '.../fern/versions/v0.3.0-content/providers/oci.md'
Every PR that touches docs/ or fern/ has been failing preview generation since #316 merged.
Additionally, the comment workflow (fern-docs-preview-comment.yml) still uses OUTPUT=$(fern generate --docs --preview ... 2>&1) which swallows fern's error on failure (same pattern fixed in #284 for the publish workflow). The actual ENOENT is invisible in the Actions log.
Fix
- Add the same
git archive step from the publish workflow to the preview build workflow (before artifact upload)
- Apply the
tee-based streaming pattern to the comment workflow's Generate preview URL step
Summary
Since #316 (frozen version content via git archive), the preview build workflow (
fern-docs-preview-build.yml) uploadsfern/anddocs/as an artifact, but does not rungit archiveto populatefern/versions/v0.3.0-content/. That directory is.gitignore'd, so the artifact is empty. The companion comment workflow then fails whenfern generate --docs --previewtries to resolve paths infern/versions/v0.3.0.yml:Every PR that touches
docs/orfern/has been failing preview generation since #316 merged.Additionally, the comment workflow (
fern-docs-preview-comment.yml) still usesOUTPUT=$(fern generate --docs --preview ... 2>&1)which swallows fern's error on failure (same pattern fixed in #284 for the publish workflow). The actual ENOENT is invisible in the Actions log.Fix
git archivestep from the publish workflow to the preview build workflow (before artifact upload)tee-based streaming pattern to the comment workflow'sGenerate preview URLstep