File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -21,24 +21,27 @@ jobs:
2121 runs-on : ubuntu-latest
2222
2323 steps :
24- # 1. 检出代码
2524 - name : Checkout
2625 uses : actions/checkout@v4
2726
28- # 2. 设置 Node.js 环境
27+ - name : Setup pnpm
28+ uses : pnpm/action-setup@v4
29+ with :
30+ version : 10
31+ run_install : false
32+
2933 - name : Setup Node.js
3034 uses : actions/setup-node@v4
3135 with :
32- node-version : ' 20' # 根据你的项目需求调整版本
33- cache : ' pnpm' # 或 'yarn' / 'pnpm'
36+ node-version : ' 20'
37+ cache : ' pnpm'
3438
35- # 3. 安装依赖
3639 - name : Install dependencies
37- run : pnpm i # 或 npm install / yarn install / pnpm install
40+ run : pnpm i --frozen-lockfile
3841
3942 # 4. 构建项目
4043 - name : Build
41- run : pnpm build # 确保 package.json 中有 build 脚本
44+ run : pnpm build
4245
4346 # 5. 配置 GitHub Pages
4447 - name : Setup Pages
You can’t perform that action at this time.
0 commit comments