Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/check-broken-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: check-broken-links

on:
pull_request:
branches:
- main

jobs:
run:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout PR
if: github.event_name == 'pull_request_target'
run: |
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }}
git checkout pr-${{ github.event.pull_request.number }}

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install Dependencies
shell: bash
run: pnpm install

- name: Run fern broken links check
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: pnpm docs:brokenLinks --strict

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"docs:check": "pnpm compile && fern check",
"docs:publish": "pnpm compile && fern generate --docs",
"docs:preview": "pnpm compile && fern generate --docs --preview --log-level debug",
"docs:brokenLinks": "pnpm compile && fern docs broken-links",
"prepublish": "exit 1"
},
"devDependencies": {
Expand Down
Loading