Previews
Enterprise feature
This feature is available only for the Enterprise plan. To get started, reach out to support@buildwithfern.com.
There are two ways to set up preview environments for your self-hosted docs:
- Container-based — deploys the same self-hosted Docker container you use in production, giving you a full-fidelity preview with search, API Explorer, and authentication.
- Static export — renders your docs to static HTML and assets that can be served from any object store (S3, GCS, R2), with no running containers required.
Both approaches render content exactly as it would appear in production.
Choosing an approach
For most teams, static export is the best starting point because of its minimal infrastructure and setup. Choose container-based if you need search, API Explorer, or authentication in your previews.
GitHub Actions workflows
The following workflows can be added to your repository to automatically build and deploy preview environments on every pull request.
Container-based preview workflow
This workflow builds the Docker image on each pull request and deploys it to your container hosting platform.
Static export preview workflow
This workflow builds the container, runs the static export, and uploads the output to S3. Adapt the upload step for your object store.