Skip to content

Commit 356f360

Browse files
committed
restructure
1 parent 064c9b0 commit 356f360

21 files changed

+101
-3
lines changed

.github/workflows/fern-check.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Fern Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
run:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install Fern
17+
run: npm install -g fern-api
18+
19+
- name: Check API is valid
20+
run: fern check

.github/workflows/node-sdk.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release Node.js SDK
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version of the Node.js SDK that you would like to release"
8+
required: true
9+
type: string
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v4
17+
18+
- name: Install Fern CLI
19+
run: npm install -g fern-api
20+
21+
- name: Generate Node.js SDK
22+
env:
23+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
run: |
26+
fern generate --group ts-sdk --version ${{ inputs.version }} --log-level debug

.github/workflows/preview-docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Preview Docs
2+
3+
on: pull_request
4+
5+
jobs:
6+
run:
7+
runs-on: ubuntu-latest
8+
permissions: write-all
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
13+
- name: Install Fern
14+
run: npm install -g fern-api
15+
16+
- name: Generate preview URL
17+
id: generate-docs
18+
env:
19+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
20+
run: |
21+
OUTPUT=$(fern generate --docs --preview 2>&1) || true
22+
echo "$OUTPUT"
23+
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
24+
echo "Preview URL: $URL"
25+
echo "🌿 Preview your docs: $URL" > preview_url.txt
26+
27+
- name: Comment URL in PR
28+
uses: thollander/actions-comment-pull-request@v2.4.3
29+
with:
30+
filePath: preview_url.txt

.github/workflows/publish-docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
run:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/heads/main') && github.run_number > 1 }}
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install Fern
17+
run: npm install -g fern-api
18+
19+
- name: Publish Docs
20+
env:
21+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
22+
run: fern generate --docs --log-level debug
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)