You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -5,9 +5,9 @@ description: Learn how Fern transforms your API specifications and documentation
5
5
6
6
Fern combines your API specifications, static Markdown files (like how-to guides and tutorials), media assets (images, videos, etc.), and custom settings defined in your `docs.yml` file to generate a beautiful, interactive documentation site hosted on Vercel.
7
7
8
-
This process is built around two major workflows: editing and deploying your documentation.
8
+
This process is built around two major workflows: **editing** and **deploying** your documentation.
9
9
10
-
## Editing workflow
10
+
## Content workflows
11
11
12
12
You can update your documentation in two ways:
13
13
@@ -16,17 +16,40 @@ You can update your documentation in two ways:
16
16
17
17
After the update goes through your review process, an approver can merge it.
18
18
19
-
## Deployment workflow
19
+
## Deployment workflows
20
20
21
-
When a pull request is merged into your docs repository:
21
+
When a pull request is merged into your docs repository, an automated pipeline transforms your content into a live documentation site and syncs it with your API changes in three main stages:
22
22
23
-
1.**GitHub Action triggers and fetches API specs**: The merged PR triggers a Fern GitHub Action. The action retrieves your API specification from a separate repository using secure token authentication. The GitHub Action only has access to the specific docs repository from which it's running.
24
-
2.**Fern CLI generates updated documentation**: [The Fern CLI](/learn/cli-api-reference/cli-reference/overview) runs `fern generate --docs` to merge API specs with your documentation and process it into a static site. During this process, Fern also indexes your content to enable search functionality across your documentation. The CLI uses a Fern token to authenticate and run the generation process.
25
-
3.**Deploy to hosting platform**: The Fern CLI deploys your generated content to the Fern Docs Server, which is hosted on Vercel.
23
+
<Steps>
26
24
27
-
This automated pipeline ensures your documentation stays synchronized with your API changes while maintaining a smooth developer workflow.
25
+
### Trigger GitHub Action and fetch API specs
28
26
29
-
<Accordiontitle="Architecture diagram">
27
+
The merged PR triggers a Fern GitHub Action. The action retrieves your API specification from a separate repository using secure token authentication. The GitHub Action only has access to the specific docs repository from which it's running.
28
+
29
+
### Generate and process content
30
+
[The Fern CLI](/learn/cli-api-reference/cli-reference/overview) runs `fern generate --docs` to merge your API specs with documentation content. Behind the scenes, this process involves several key components:
31
+
32
+
-**Input processing**: The system combines your API specification files, `docs.yml` configuration file, `.mdx` files, and media content.
33
+
-**Core infrastructure**: The generation process runs on Fern's AWS VPC infrastructure, where the Fern Docs microservice acts as the central orchestrator. This microservice coordinates content processing while connecting to a database for storing indexed content and S3 for asset storage.
34
+
-**Content indexing**: During generation, Fern automatically indexes your documentation content to enable search functionality across your entire site. This indexing integrates with external services: [Algolia](/learn/docs/customization/search) for advanced search capabilities, UpStash for caching, PostHog for analytics, TurboPuffer for vector storage, and AI inference services (Bedrock, Claude) for intelligent content processing.
35
+
36
+
### Deploy to hosting platform
37
+
38
+
The processed content is deployed to Vercel as a documentation site with an embedded [API explorer](/learn/docs/api-references/api-explorer/overview) that allows users to test endpoints directly within the documentation.
39
+
40
+
Vercel Edge middleware handles the underlying routing, authentication, and performance optimization.
41
+
42
+
The deployed documentation site integrates with external systems like Cloudflare for CORS management and WorkOS for enterprise authentication.
43
+
44
+
45
+
</Steps>
46
+
47
+
## Diagrams
48
+
49
+
<AccordionGroup>
50
+
<Accordiontitle="Editing and deployment workflows">
51
+
52
+
This diagram shows how content flows from editing to deployment.
0 commit comments