-
Notifications
You must be signed in to change notification settings - Fork 169
44 lines (37 loc) · 1.33 KB
/
publish-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: publish-docs
on:
workflow_dispatch: # Added manual trigger
push:
paths:
- "fern/**"
- ".github/workflows/publish-docs.yml"
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v4
- name: Install
uses: ./.github/actions/install
- name: Publish Docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
run: |
pnpm --filter @fern-api/cli dist:cli:prod
cli_path="$(pwd)/packages/cli/cli/dist/prod/cli.cjs"
node $cli_path 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