Skip to content

[Bug]: fern preview build missing frozen version content and swallowing errors #891

Description

@pdmack

Prerequisites

  • I searched existing issues and found no duplicates
  • I can reproduce this issue consistently
  • This is not a security vulnerability

Bug Description

Two issues in the Fern preview pipeline:

  1. Preview build missing frozen version content — The publish workflow uses git archive to populate fern/versions/v*-content/ from tagged releases, but the preview build workflow does not. PRs touching docs/ or fern/ fail preview generation because the versioned content directories are empty.

  2. Preview comment swallows fern errorsOUTPUT=$(fern generate ... 2>&1) || true captures output into a variable, so errors are not streamed to the CI log in real time. If fern generate fails, the output is printed after the fact but the || true masks the exit code.

Impact

High (major functionality broken)

Component

Docs / examples

Regression?

Yes, this worked before (broken since versioned docs were added)

Steps to Reproduce

  1. Open a PR that touches docs/
  2. Preview build succeeds but the artifact has empty version content directories
  3. Preview comment workflow fails to generate a preview URL

Expected Behavior

Preview build populates frozen version content via git archive (matching the publish workflow) and fern errors are streamed to the CI log.

Actual Behavior

Version content directories are empty and fern errors are captured into a variable, masking real-time output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions