Skip to content

Commit

Permalink
Merge branch 'main' into ab/FER-2626
Browse files Browse the repository at this point in the history
  • Loading branch information
armandobelardo authored Aug 8, 2024
2 parents a2b603b + f641a5a commit fdbf988
Show file tree
Hide file tree
Showing 2,231 changed files with 91,436 additions and 11,661 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ jobs:
- name: Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Run tests
run: yarn test --maxWorkers 15 --ci --silent

Expand Down
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
153 changes: 153 additions & 0 deletions .github/workflows/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -114,6 +123,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -139,6 +157,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Install Poetry
uses: snok/install-poetry@v1

Expand Down Expand Up @@ -171,6 +198,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Install Poetry
uses: snok/install-poetry@v1

Expand Down Expand Up @@ -203,6 +239,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Install Poetry
uses: snok/install-poetry@v1

Expand Down Expand Up @@ -235,6 +280,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -260,6 +314,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -285,6 +348,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -310,6 +382,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -335,6 +416,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -360,6 +450,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -385,6 +484,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -410,6 +518,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -435,6 +552,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -460,6 +586,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -485,6 +620,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand All @@ -510,6 +654,15 @@ jobs:
- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/[email protected]

- name: Seed Test
env:
FORCE_COLOR: "2"
Expand Down
Loading

0 comments on commit fdbf988

Please sign in to comment.