Skip to content

Commit 4b1f33b

Browse files
authored
🔨 Add Doc Build Check.
2 parents 0b27fe2 + ed75732 commit 4b1f33b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Docker Build Doc Check
2+
3+
concurrency:
4+
group: docker-build-doc-dev-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
workflow_dispatch:
9+
pull_request:
10+
branches: [develop]
11+
paths:
12+
- 'doc/**'
13+
- '.github/workflows/**'
14+
push:
15+
branches: [develop]
16+
paths:
17+
- 'doc/**'
18+
- '.github/workflows/**'
19+
20+
jobs:
21+
build-docs-check:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '18'
31+
32+
- name: Install dependencies
33+
run: |
34+
cd doc
35+
npm install
36+
37+
- name: Build doc
38+
run: |
39+
cd doc
40+
npm run docs:build
41+
BUILD_EXIT_CODE=$?
42+
43+
if [ $BUILD_EXIT_CODE -ne 0 ]; then
44+
echo "❌ Doc build failed with exit code $BUILD_EXIT_CODE"
45+
exit $BUILD_EXIT_CODE
46+
else
47+
echo "✅ Doc build completed successfully"
48+
fi

0 commit comments

Comments
 (0)