ci(.drone.yml): Switch back to pnpm for project management
Some checks failed
continuous-integration/drone/push Build is failing

- 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
This commit is contained in:
lixin 2025-01-25 10:11:08 +08:00
parent 14b6550aed
commit 6bd32f5669

View File

@ -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