Skip to content

Add Fern docs workflows for PR preview and publish on main#4

Merged
hawkeyexl merged 4 commits intomainfrom
copilot/add-workflows-for-docs-preview
Feb 27, 2026
Merged

Add Fern docs workflows for PR preview and publish on main#4
hawkeyexl merged 4 commits intomainfrom
copilot/add-workflows-for-docs-preview

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

Adds CI/CD workflows for Fern docs: preview builds on PRs, publish on merge to main.

  • publish-docs.yml — Runs fern generate --docs on push to main or manual dispatch. Skips initial run (github.run_number > 1).
  • preview-docs.yml — Runs fern generate --docs --preview on PRs or manual dispatch, extracts the preview URL, and upserts a comment on the PR. Includes fallback messaging if preview generation fails.

Both workflows support workflow_dispatch for manual triggering. Both require a FERN_TOKEN repository secret. Actions are SHA-pinned per existing repo convention.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflows to preview and publish documentation updates Add Fern docs workflows for PR preview and publish on main Feb 27, 2026
@hawkeyexl
Copy link
Contributor

@copilot Add workflow_dispatch to both of these workflows

Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot Add workflow_dispatch to both of these workflows

Done — added workflow_dispatch to both workflows in 6e47248.

@hawkeyexl hawkeyexl marked this pull request as ready for review February 27, 2026 13:36
Copilot AI review requested due to automatic review settings February 27, 2026 13:36
@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds GitHub Actions workflows to automate Fern documentation builds and deployments. The workflows enable preview builds for pull requests and automatic publishing when changes are merged to main, streamlining the documentation development process.

Changes:

  • Added publish-docs.yml workflow to automatically publish docs on main branch pushes
  • Added preview-docs.yml workflow to generate preview URLs for pull requests with automatic PR comments
  • Both workflows use SHA-pinned actions following repository security conventions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/publish-docs.yml Publishes Fern docs to production on main branch pushes; includes conditional logic to skip first run
.github/workflows/preview-docs.yml Generates preview docs for PRs with URL extraction and automated PR commenting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hawkeyexl hawkeyexl merged commit 2f6ca9b into main Feb 27, 2026
1 check passed
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.

3 participants