Skip to content

chore(github): update fern github actions#268

Merged
dmitsh merged 1 commit into
mainfrom
ds-fern
Apr 19, 2026
Merged

chore(github): update fern github actions#268
dmitsh merged 1 commit into
mainfrom
ds-fern

Conversation

@dmitsh
Copy link
Copy Markdown
Collaborator

@dmitsh dmitsh commented Apr 18, 2026

No description provided.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 18, 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.

@dmitsh
Copy link
Copy Markdown
Collaborator Author

dmitsh commented Apr 18, 2026

/ok-to-test 50e9703

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 18, 2026

Greptile Summary

This PR migrates four Fern documentation GitHub Actions workflows from pull_request triggers to push on pull-request/[0-9]+ branches, and switches all runners from ubuntu-latest to linux-amd64-cpu8.

Two P1 issues from the previous review round remain unresolved in the current diff:

  • fern-docs-preview-build.yml: github.event.pull_request.number, github.head_ref, and github.base_ref are pull_request-only context variables and will all be empty strings under the new push trigger, causing the downstream comment workflow to call gh api with an empty PR number and fern generate --preview --id \"\" with an empty ID.
  • publish-fern-docs.yml: Removing branches: main leaves the push trigger unscoped by branch — any push to any branch touching docs/** or fern/** will now publish directly to the live Fern site.

Confidence Score: 4/5

Not safe to merge until the two unresolved P1 issues (empty PR context variables in preview-build and unguarded live publish trigger) are addressed.

Two P1 findings from the prior review round are confirmed still present in the current file contents: the preview build workflow uses pull_request-only context variables under a push trigger (empty PR number breaks the comment workflow), and the publish workflow has no branch guard (any branch push to docs paths publishes live).

.github/workflows/fern-docs-preview-build.yml (empty PR context variables) and .github/workflows/publish-fern-docs.yml (missing branch guard on push trigger)

Important Files Changed

Filename Overview
.github/workflows/fern-docs-ci.yml Changed trigger from pull_request to push with branches: "pull-request/[0-9]+"; added workflow_dispatch at correct top-level; runner switched to linux-amd64-cpu8.
.github/workflows/fern-docs-preview-build.yml Changed trigger from pull_request to push; PR context variables (github.event.pull_request.number, github.head_ref, github.base_ref) will all be empty strings under the push event — already flagged as P1 in prior review.
.github/workflows/fern-docs-preview-comment.yml Only runner changed from ubuntu-latest to linux-amd64-cpu8; no logic changes. Safe.
.github/workflows/publish-fern-docs.yml Removed branches: main from push trigger; any branch push touching docs/** or fern/** can now publish to the live Fern site — already flagged as P1 in prior review. Runner switched to linux-amd64-cpu8.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub
    participant BuildWF as Preview Build WF<br/>(push: pull-request/N)
    participant CommentWF as Preview Comment WF<br/>(workflow_run)
    participant PublishWF as Publish WF<br/>(push: any branch + paths / tag)
    participant Fern as Fern Docs Site

    Dev->>GH: push to pull-request/123 branch
    GH->>BuildWF: trigger (docs/** or fern/** changed)
    BuildWF->>BuildWF: Save PR metadata (pr_number="" ⚠️)
    BuildWF->>GH: upload artifact fern-preview

    GH->>CommentWF: trigger on workflow_run completed
    CommentWF->>GH: download artifact
    CommentWF->>Fern: fern generate --docs --preview --id HEAD_REF
    CommentWF->>GH: post PR comment with preview URL

    Dev->>GH: push to ANY branch touching docs/**
    GH->>PublishWF: trigger ⚠️ (no branches filter)
    PublishWF->>Fern: fern generate --docs (publishes live!)
Loading

Reviews (8): Last reviewed commit: "chore(github): update fern github action..." | Re-trigger Greptile

@dmitsh
Copy link
Copy Markdown
Collaborator Author

dmitsh commented Apr 18, 2026

/ok-to-test 6e9a0f4

Comment thread .github/workflows/fern-docs-ci.yml Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.46%. Comparing base (1875ab8) to head (b717f34).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #268   +/-   ##
=======================================
  Coverage   68.46%   68.46%           
=======================================
  Files          82       82           
  Lines        4842     4842           
=======================================
  Hits         3315     3315           
  Misses       1395     1395           
  Partials      132      132           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dmitsh dmitsh force-pushed the ds-fern branch 3 times, most recently from 7978f4d to b717f34 Compare April 18, 2026 04:41
@dmitsh
Copy link
Copy Markdown
Collaborator Author

dmitsh commented Apr 18, 2026

/ok-to-test b717f34

@resker
Copy link
Copy Markdown
Collaborator

resker commented Apr 18, 2026

Small typo in fern-docs-ci.yml: the new paths: filter references .github/workflows/fern-docs-ci.yaml, but the actual file is fern-docs-ci.yml (one l). Looks like it was copied from AICR's workflow (where the file is .yaml).

The filter as written won't match changes to the workflow file itself. Two ways to fix:

  • Change to .yml to match the actual filename, or
  • Drop the path filter entirely — NVSentinel's equivalent has no workflow-file filter and this PR otherwise aligns cleanly to NVSentinel's pattern.

@dmitsh
Copy link
Copy Markdown
Collaborator Author

dmitsh commented Apr 19, 2026

/ok-to-test 90cae34

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 19, 2026

Want your agent to iterate on Greptile's feedback? Try greploops.

Comment thread .github/workflows/go.yml Outdated
@dmitsh
Copy link
Copy Markdown
Collaborator Author

dmitsh commented Apr 19, 2026

/ok-to-test ba87bf8

@dmitsh
Copy link
Copy Markdown
Collaborator Author

dmitsh commented Apr 19, 2026

/ok-to-test 996e5ca

Comment thread docs/overview.md
Signed-off-by: Dmitry Shmulevich <dshmulevich@nvidia.com>
@dmitsh dmitsh merged commit 2725c4d into main Apr 19, 2026
1 check passed
@dmitsh dmitsh deleted the ds-fern branch April 19, 2026 01:06
dmitsh pushed a commit that referenced this pull request Apr 29, 2026
PR #268 removed the `branches: [main]` push filter from
`publish-fern-docs.yml` while keeping the `tags: [docs/v*]` filter. With
GitHub Actions, defining `tags:` without a corresponding `branches:`
restricts push events to tag refs only — branch pushes (including main)
no longer trigger the workflow even when their changed paths match the
`paths:` filter.

Symptom: the live Fern site at
https://topograph.docs.buildwithfern.com/topograph has not been
republished since the manual workflow_dispatch on 2026-04-20T16:51Z.
PRs #284, #289, #290, #291, and #292 all touched docs/ but produced
zero workflow runs. The Reference section restored by #284 (and the
clique-semantics clarifications added by #289) are on main but invisible
on the published site.

Restore `branches: [main]` so push events to main with docs/ or fern/
changes resume triggering publishes. Tag pushes for `docs/v*` and manual
`workflow_dispatch` continue to work unchanged.

To clear the backlog after this PR merges, dispatch the workflow
manually one time:

  gh workflow run publish-fern-docs.yml --repo NVIDIA/topograph --ref main

Signed-off-by: Rob Esker <resker@nvidia.com>
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.

2 participants