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