Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/actions/deploy-cf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,10 @@ runs:
key: frontend-node-${{ hashFiles('frontend/package-lock.json') }}

- name: Install worker dependencies
if: steps.cache-worker.outputs.cache-hit != 'true'
working-directory: worker
shell: bash
run: npm install
run: npm ci

- name: Build
working-directory: worker
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
node-version: '22'
cache: npm
cache-dependency-path: backend/package-lock.json
# 直接缓存 node_modules:better-sqlite3 是原生模块,~/.npm 缓存命中后 npm ci 仍要
# 重新解压并下载/编译原生二进制,波动大。命中 node_modules 后直接跳过 npm ci。
- name: Cache backend node_modules
id: cache-backend
uses: actions/cache@v5
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ jobs:
key: frontend-node-${{ hashFiles('frontend/package-lock.json') }}

- name: Install worker dependencies
if: steps.cache-worker.outputs.cache-hit != 'true'
working-directory: worker
run: npm install
run: npm ci

- name: Build and package
working-directory: worker
Expand Down
2 changes: 1 addition & 1 deletion worker/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ console.log(` Set OBFUSCATE_FRONTEND=true to enable frontend obfuscation`);
console.log(` Set OBFUSCATE_WORKER=true to enable worker obfuscation (may break on Cloudflare)\n`);

console.log(`[${++step}/${totalSteps}] Installing frontend dependencies...`);
execSync('npm install', { cwd: frontendDir, stdio: 'inherit' });
execSync('npm ci', { cwd: frontendDir, stdio: 'inherit' });

console.log(`[${++step}/${totalSteps}] Building frontend (base=/admin/)...`);
execSync('npm run build', {
Expand Down
Loading