Skip to content

Commit

Permalink
(fix): LaTeX (#4233)
Browse files Browse the repository at this point in the history
* (docs): document latex

* publish docs with latest fern client

* upgrade next-mdx-remote and remark-gfm

* revert fern.yml workflow

* fix replaceReferencedMarkdown

* unrevert fern.yml
  • Loading branch information
abvthecity authored Aug 8, 2024
1 parent d59094f commit 5ee2d80
Show file tree
Hide file tree
Showing 156 changed files with 1,186 additions and 1,689 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/fern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,23 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install

- name: Check API definition is valid
env:
FORCE_COLOR: "2"
run: fern check
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: |
yarn workspace @fern-api/cli dist:cli:prod
cli_path="$(yarn workspace @fern-api/cli bin fern:prod)"
node $cli_path check
16 changes: 13 additions & 3 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install

- name: Generate preview URL
id: generate-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: |
OUTPUT=$(fern generate --docs --preview --instance fern.docs.buildwithfern.com/learn 2>&1) || true
yarn workspace @fern-api/cli dist:cli:prod
cli_path="$(yarn workspace @fern-api/cli bin fern:prod)"
OUTPUT=$(node $cli_path 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
33 changes: 22 additions & 11 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,31 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install

- name: Publish Docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: fern generate --docs --log-level debug --instance fern.docs.buildwithfern.com/learn

- name: Install fern-dev CLI
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.YARN_NPM_AUTH_TOKEN }}
npm install -g @fern-api/fern-api-dev --prefix=$HOME/.local
yarn workspace @fern-api/cli dist:cli:prod
cli_path="$(yarn workspace @fern-api/cli bin fern:prod)"
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
# - 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
Loading

0 comments on commit 5ee2d80

Please sign in to comment.