Skip to content

Commit 7bc2b45

Browse files
committed
ci: add content check workflow
1 parent 4579344 commit 7bc2b45

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Content Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/*.md'
7+
- '**/*.mdx'
8+
- 'contentlayer.config.ts'
9+
- 'package.json'
10+
- 'pnpm-lock.yaml'
11+
- 'next.config.mjs'
12+
- 'postcss.config.mjs'
13+
- 'tailwind.config.ts'
14+
- 'tsconfig.json'
15+
16+
jobs:
17+
check-content:
18+
runs-on: ubuntu-latest
19+
env:
20+
NEXT_TELEMETRY_DISABLED: '1'
21+
CI: 'true'
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: pnpm/action-setup@v4
26+
with:
27+
version: 10
28+
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: 'pnpm'
33+
34+
- run: pnpm install --frozen-lockfile
35+
- run: pnpm run check:content
36+

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
8-
"start": "next start"
8+
"start": "next start",
9+
"check:content": "contentlayer build"
910
},
1011
"dependencies": {
1112
"next": "^15.5.3",

0 commit comments

Comments
 (0)