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:
riba2534
2026-06-28 13:28:04 +08:00
parent 9566ffd438
commit 62437b6886
4 changed files with 1634 additions and 2559 deletions

View File

@@ -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'