Skip to content

Commit 8c01bf2

Browse files
shep-ai[bot]claude
andcommitted
ci(docs): add pr build check for docs site
Splits workflow into build (runs on PRs) and deploy (runs on main push only) so broken docs are caught before merge. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2ff7442 commit 8c01bf2

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,42 @@ on:
77
paths:
88
- 'docs/**'
99
- '.github/workflows/docs.yml'
10+
pull_request:
11+
paths:
12+
- 'docs/**'
13+
- '.github/workflows/docs.yml'
1014
workflow_dispatch:
1115

1216
permissions:
1317
contents: write
1418

1519
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
defaults:
23+
run:
24+
working-directory: docs
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 22
34+
cache: npm
35+
cache-dependency-path: docs/package-lock.json
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Build Docusaurus site
41+
run: npm run build
42+
1643
deploy:
44+
needs: build
45+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
1746
runs-on: ubuntu-latest
1847
defaults:
1948
run:

0 commit comments

Comments
 (0)