Skip to content

Commit 60e1830

Browse files
committed
build docs locally to test broken links
1 parent 4fe6cee commit 60e1830

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

.github/workflows/docs-validation.yml

+26-14
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,36 @@ on:
1212
- main
1313

1414
jobs:
15-
link-check:
16-
name: Broken link checker
17-
runs-on: ubuntu-latest
15+
link-check:
16+
name: Broken link checker
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
1822

19-
steps:
20-
- name: Checkout code
21-
uses: actions/checkout@v4
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: "20"
27+
cache: "pnpm"
2228

23-
- name: Set up Rust
24-
uses: actions-rs/toolchain@v1
25-
with:
26-
toolchain: stable
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Build static site
33+
run: pnpm build
34+
35+
- name: Set up Rust
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: stable
2739

28-
- name: Install lychee
29-
run: cargo install lychee
40+
- name: Install lychee
41+
run: cargo install lychee
3042

31-
- name: Check links
32-
run: lychee --verbose --no-progress './src/pages/learn/**/*.mdx' --base https://graphql.org
43+
- name: Check links
44+
run: lychee --verbose --no-progress './out/**/*.html'
3345

3446
code-validate:
3547
name: Code snippet and GraphQL validation

0 commit comments

Comments
 (0)