修复 Drone CI 配置:移除 host volumes 以解决 untrusted 仓库问题
Some checks failed
continuous-integration/drone/push Build is failing

- 移除 npm-cache volume 挂载
- 同一构建内的步骤仍可共享 node_modules
- 使用国内镜像加速依赖下载

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
n72595987@gmail.com
2025-11-29 17:45:39 +08:00
parent 40b1e48f11
commit 1d8d60ccaa

View File

@@ -13,9 +13,6 @@ steps:
# 步骤1安装依赖 # 步骤1安装依赖
- name: 安装依赖 - name: 安装依赖
image: node:18-alpine image: node:18-alpine
volumes:
- name: npm-cache
path: /root/.npm
commands: commands:
- echo "开始安装 npm 依赖..." - echo "开始安装 npm 依赖..."
- npm install --registry=https://registry.npmmirror.com - npm install --registry=https://registry.npmmirror.com
@@ -63,9 +60,3 @@ steps:
- sleep 5 - sleep 5
- curl -f http://154.30.6.21:2888 || exit 1 - curl -f http://154.30.6.21:2888 || exit 1
- echo "✅ 前端访问正常" - echo "✅ 前端访问正常"
# 挂载卷(缓存 npm 依赖)
volumes:
- name: npm-cache
host:
path: /data/drone-cache/npm