fix: 修复 npm 安装依赖网络超时问题
ci/woodpecker/push/woodpecker Pipeline failed

- 添加国内 npm registry 镜像配置(npmmirror)
- 添加重试机制:先尝试 offline 模式,失败后重试正常模式
This commit is contained in:
张翔
2026-03-31 18:15:24 +08:00
parent 5f9c5c9962
commit b33ceaf017
+2 -1
View File
@@ -8,8 +8,9 @@ steps:
environment:
NODE_ENV: development
CI: true
npm_config_registry: https://registry.npmmirror.com
commands:
- npm ci --cache /tmp/npm-cache --prefer-offline --legacy-peer-deps
- npm ci --cache /tmp/npm-cache --prefer-offline --legacy-peer-deps || npm ci --cache /tmp/npm-cache --legacy-peer-deps
volumes:
- /tmp/npm-cache:/root/.npm
- /tmp/node-modules-cache:/woodpecker/src/node_modules