Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix, internal): do deploys of fern docs to dev #3529

Merged
merged 5 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
OUTPUT=$(fern generate --docs --preview 2>&1) || true
OUTPUT=$(fern generate --docs --preview --instance fern.docs.buildwithfern.com/learn 2>&1) || true
echo "$OUTPUT"
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
echo "Preview URL: $URL"
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,14 @@ jobs:
- name: Publish Docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: fern generate --docs --log-level debug
run: fern generate --docs --log-level debug --instance fern.docs.buildwithfern.com/learn

- name: Install fern-dev CLI
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.YARN_NPM_AUTH_TOKEN }}
npm install -g @fern-api/fern-api-dev --prefix=$HOME/.local

- name: Publish Docs to dev
env:
FERN_TOKEN: ${{ secrets.FERN_ORG_TOKEN_DEV }}
run: fern-dev generate --docs --log-level debug --instance fern.docs.dev.buildwithfern.com/learn
6 changes: 6 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ instances:
owner: fern-api
repo: fern
branch: main
- url: fern.docs.dev.buildwithfern.com/learn
edit-this-page:
github:
owner: fern-api
repo: fern
branch: main
title: Fern

tabs:
Expand Down