Pull request previews
PR previews
offer a way to preview changes from pull requests (PRs) before merging code to a production branch. This is useful for reviewing documentation changes before publishing them to your live documentation site. Use manually or in GitHub Actions.
Usage
Example
Usage in GitHub Actions
The following is a GitHub Action workflow that generates a preview URL for every pull request. Be sure to add the FERN_TOKEN
for your organization to the repository.
.github/workflows/preview-docs.yml
Allow PR previews to be generated from forks
Fern’s PR previews GitHub Action requires a Fern token to run. Depending on your repository’s permissions, you may need to use the following workflow to allow PR previews from forks to access this token.
Link expiration
Preview links do not expire. However, the time to live (TTL) is subject to change in the future.