mirror of
https://github.com/riba2534/TCP-IP-NetworkNote.git
synced 2026-06-29 17:36:05 +08:00
fix: CI 改用 pnpm 解决 npm 'Exit handler never called' 崩溃
GitHub runner 上 npm install/ci 反复 'Exit handler never called!' 崩溃 (72s 无输出后退出),改用 pnpm 9 + Node 22: - pnpm/action-setup@v4 + setup-node cache pnpm - 生成 pnpm-lock.yaml,删除 package-lock.json - package.json 加 packageManager 字段,scripts 统一 pnpm
This commit is contained in:
14
.github/workflows/deploy.yml
vendored
14
.github/workflows/deploy.yml
vendored
@@ -14,18 +14,22 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
node-version: '22'
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: site/pnpm-lock.yaml
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --no-fund --no-audit
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
working-directory: site
|
||||
env:
|
||||
NODE_OPTIONS: '--max-old-space-size=4096'
|
||||
|
||||
- name: Build site
|
||||
run: npm run build
|
||||
run: pnpm run build
|
||||
working-directory: site
|
||||
env:
|
||||
NODE_OPTIONS: '--max-old-space-size=4096'
|
||||
|
||||
2550
site/package-lock.json
generated
2550
site/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,11 +4,12 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"gen": "node scripts/build.mjs",
|
||||
"dev": "npm run gen && vitepress dev",
|
||||
"build": "npm run gen && vitepress build",
|
||||
"dev": "pnpm run gen && vitepress dev",
|
||||
"build": "pnpm run gen && vitepress build",
|
||||
"preview": "vitepress preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitepress": "^1.5.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@9.15.9"
|
||||
}
|
||||
1620
site/pnpm-lock.yaml
generated
Normal file
1620
site/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user