Skip to content

Commit 15f25c8

Browse files
Update QuickStart readme (#82)
1 parent 1753af3 commit 15f25c8

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

README.md

Lines changed: 28 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,9 @@ 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.
88+
89+
You might also be prompted, `yes` or `no`, about if you want to proceed with generating docs and informed that you can choose between using the `--preview` flag or not. You can choose to use either `fern generate --docs` or `fern generate --docs --preview` at this time. This decision is important later, when you are making changes that might affect a production docs environment, but it won't impact your docs project now.
8590

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

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

96101
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).
97102

98-
### Step 6: Customize your documentation
103+
### Step 6: Preview your documentation
104+
You can generate documentation previews
99105

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

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

110+
#### Configure PR previews
111+
112+
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.
113+
114+
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).
115+
2. For the **Name**, use `FERN_TOKEN`.
116+
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.
117+
4. Copy the output from your terminal, and paste in GitHub as the **Value**.
118+
5. Save your new secret.
119+
120+
You might need to re-run preview builds for any PRs that were opened before you configured the `FERN_TOKEN`.
121+
122+
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.
123+
124+
### Step 7: Customize your documentation
125+
126+
You must run `fern generate --docs` after any modifications to re-generate and publish your documentation site.
127+
104128
To use your own OpenAPI specification file or to update the existing one:
105129

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

0 commit comments

Comments
 (0)