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
When using the QuickStart to make a first PR, users will encounter failed PR preview builds without configuring a FERN_TOKEN. Existing docs have sufficient info to resolve, but it's not presently centralized.
It's a very lightweight process, and feels appropriate to add to the QuickStart.
Copy file name to clipboardExpand all lines: README.md
+26-4Lines changed: 26 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,10 @@ Run the following command to ensure you are using the latest version of Fern:
64
64
fern upgrade
65
65
```
66
66
67
-
Replace `plantstore` with your own organization's name. Use only alphanumeric characters, hyphens, and underscores. Do not use spaces and leave the rest of the URL (`docs.buildwithfern.com`) unchanged.
67
+
Replace `plantstore` with your own organization's name. Use only alphanumeric characters, hyphens, and underscores.
68
+
69
+
**2. Update `docs.yml`:**
70
+
Open the `docs.yml` file and change the `instances.url` value from `plantstore` to your company name that you used for the `organization` name. **Do not use spaces and leave the rest of the URL (`docs.buildwithfern.com`) unchanged.**
68
71
69
72
It should now read:
70
73
@@ -81,7 +84,7 @@ Run the following command:
81
84
fern generate --docs
82
85
```
83
86
84
-
You will be prompted to log in and connect your GitHub account.
87
+
You will be prompted to log in and connect your GitHub account. You might also
85
88
86
89
Once the documentation is generated, you will receive the URL where your documentation is published. For example:
87
90
@@ -95,12 +98,31 @@ Once the documentation is generated, you will receive the URL where your documen
95
98
96
99
Preview your documentation locally. Run `fern docs dev` to access your docs on your local server at port 3000, hot-reloading as you edit your markdown and OpenAPI files. [Learn more](https://buildwithfern.com/learn/docs/getting-started/development?utm_source=github&utm_medium=readme&utm_campaign=docs-starter-openapi&utm_content=step6) or [watch a 10-second demo](https://www.loom.com/share/0a4658bd78cb45d5a9519277852c7a24?sid=3ce69ad0-bfdb-4fa1-9abf-2f4366d084b9).
97
100
98
-
### Step 6: Customize your documentation
101
+
### Step 6: Preview your documentation
102
+
You can generate documentation previews
99
103
100
-
You must run `fern generate --docs` after any modifications to re-generate and publish your documentation site.
104
+
#### Genrate previews from CLI
101
105
102
106
To preview updates to your documentation before publishing changes, run `fern generate --docs --preview`.
103
107
108
+
#### Configure PR previews
109
+
110
+
Your quickstart Fern project also includes GitHub Actions, including an action that enables generating previews in PRs. You don't need to update anything in the GitHub actions, but you do need to create a `FERN_TOKEN` auth token to enable them.
111
+
112
+
1. Open your GitHub repository and [create a new repository secret](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets#creating-secrets-for-a-repository).
113
+
2. For the **Name**, use `FERN_TOKEN`.
114
+
3. In your local terminal, run [`fern token`](https://buildwithfern.com/learn/cli-api-reference/cli-reference/commands#detailed-command-documentation) to generate an auth token value.
115
+
4. Copy the output from your terminal, and paste in GitHub as the **Value**.
116
+
5. Save your new secret.
117
+
118
+
You might need to re-run preview builds for any PRs that were opened before you configured the `FERN_TOKEN`.
119
+
120
+
For more information about built-in automation for previews and the `preview-docs.yml` GitHub action, see the [Previewing changes in a PR](https://buildwithfern.com/learn/docs/preview-publish/previewing-changes-in-a-pr#usage-in-github-actions) Fern docs.
121
+
122
+
### Step 7: Customize your documentation
123
+
124
+
You must run `fern generate --docs` after any modifications to re-generate and publish your documentation site.
125
+
104
126
To use your own OpenAPI specification file or to update the existing one:
105
127
106
128
- Update or replace the OpenAPI specification file in the `openapi/` folder.
0 commit comments