From 6bd32f5669ed1f23b53914df0101fcfe81366f15 Mon Sep 17 00:00:00 2001 From: lixin <2967839139@qq.com> Date: Sat, 25 Jan 2025 10:11:08 +0800 Subject: [PATCH] ci(.drone.yml): Switch back to pnpm for project management - Reverted from npm to pnpm for all commands (install, build, start) - Restored pnpm as the primary package manager in the CI pipeline - Added node_modules volume for deploy step to ensure consistent dependencies - Simplified and cleaned up comments in the configuration --- .drone.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index ec16e59..21cdd55 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,10 +25,8 @@ steps: - npm config set registry https://registry.npmmirror.com - npm install -g pnpm - pnpm config set registry https://registry.npmmirror.com - # 安装pnpm - # 安装依赖 - - pnpm install + - pnpm install - name: build image: node:22-alpine @@ -38,19 +36,21 @@ steps: path: /drone/src/node_modules commands: # 构建项目 - - npm run build + - pnpm run build - name: deploy image: node:22-alpine depends_on: [build] + volumes: + - name: node_modules + path: /drone/src/node_modules commands: # 启动服务 - - npm start + - pnpm start environment: NODE_ENV: production PORT: 8001 -# 触发条件 trigger: branch: - main