Skip to content

Commit db9d669

Browse files
Update QuickStart readme - FERN_TOKEN
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.
1 parent 1753af3 commit db9d669

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ Run the following command to ensure you are using the latest version of Fern:
6464
fern upgrade
6565
```
6666

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.**
6871

6972
It should now read:
7073

@@ -81,7 +84,7 @@ Run the following command:
8184
fern generate --docs
8285
```
8386

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
8588

8689
Once the documentation is generated, you will receive the URL where your documentation is published. For example:
8790

@@ -95,12 +98,31 @@ Once the documentation is generated, you will receive the URL where your documen
9598

9699
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).
97100

98-
### Step 6: Customize your documentation
101+
### Step 6: Preview your documentation
102+
You can generate documentation previews
99103

100-
You must run `fern generate --docs` after any modifications to re-generate and publish your documentation site.
104+
#### Genrate previews from CLI
101105

102106
To preview updates to your documentation before publishing changes, run `fern generate --docs --preview`.
103107

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+
104126
To use your own OpenAPI specification file or to update the existing one:
105127

106128
- Update or replace the OpenAPI specification file in the `openapi/` folder.

0 commit comments

Comments
 (0)