Add Fern docs workflows for PR preview and publish on main#4
Merged
Conversation
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
Contributor
|
@copilot Add workflow_dispatch to both of these workflows |
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
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.ymlworkflow to automatically publish docs on main branch pushes - Added
preview-docs.ymlworkflow 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds CI/CD workflows for Fern docs: preview builds on PRs, publish on merge to main.
publish-docs.yml— Runsfern generate --docson push tomainor manual dispatch. Skips initial run (github.run_number > 1).preview-docs.yml— Runsfern generate --docs --previewon 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_dispatchfor manual triggering. Both require aFERN_TOKENrepository 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.