Publishing your docs
When you are ready for your docs to be publicly accessible, you can publish them using the Fern CLI.
Usage
Example
Usage in GitHub Actions
To automate the publishing process, you can use a GitHub Action workflow to publish your docs when a push is made to the main
branch. Be sure to add the FERN_TOKEN
for your organization to the repository.
Unpublishing your docs
If you need to take down your docs site or remove confidential information, you cannot unpublish the site itself. Instead, you should replace the navigation
object with an empty list. Once published, this will remove all content and lead the user to a 404 error
page.
- Update the navigation in
docs.yml
by changing the file content to:
- Publish the site by running
fern generate --docs
.
This approach will:
- Replace your existing docs with an empty site
- Remove any of your information
- Provide a clean slate if you want to rebuild your documentation later
Getting help
If you need assistance with this process, join our community Slack and ask in the #help channel
Hosting
When you publish your docs, Fern takes care of hosting them for you. To publish your docs to a custom domain, check out our docs here.
Self-hosting your docs
This feature is available on the Enterprise plan. Contact us to learn more.
If you need access to your docs offline or want to host them on your own infrastructure, Fern offers an easy self-hosting option. We provide your documentation site as a ready-to-run Docker container. Simply deploy it to your server or cloud environment to maintain full control over uptime, access, and security.