Skip to content

Commit aff0c80

Browse files
committed
更新 CI 配置以使用 pnpm 替代 npm 进行依赖安装和构建
1 parent 14b9527 commit aff0c80

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,28 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121

22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v3
24+
with:
25+
version: 9
26+
2227
- name: Setup Node.js
2328
uses: actions/setup-node@v4
2429
with:
2530
node-version: '20'
26-
cache: 'npm'
31+
cache: 'pnpm'
2732

2833
- name: Install dependencies
29-
run: npm ci
34+
run: pnpm install --frozen-lockfile
3035

3136
- name: Generate source files
32-
run: npx fumadocs-mdx
37+
run: pnpm exec fumadocs-mdx
3338

3439
- name: Type check
35-
run: npx tsc --noEmit
40+
run: pnpm exec tsc --noEmit
3641

3742
- name: Build
38-
run: npm run build
43+
run: pnpm run build
3944
env:
4045
NODE_ENV: production
4146

0 commit comments

Comments
 (0)