ci(.drone.yml): Switch back to pnpm for project management
Some checks failed
continuous-integration/drone/push Build is failing
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:
parent
14b6550aed
commit
6bd32f5669
10
.drone.yml
10
.drone.yml
@ -25,8 +25,6 @@ steps:
|
|||||||
- npm config set registry https://registry.npmmirror.com
|
- npm config set registry https://registry.npmmirror.com
|
||||||
- npm install -g pnpm
|
- npm install -g pnpm
|
||||||
- pnpm config set registry https://registry.npmmirror.com
|
- pnpm config set registry https://registry.npmmirror.com
|
||||||
# 安装pnpm
|
|
||||||
|
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
- pnpm install
|
- pnpm install
|
||||||
|
|
||||||
@ -38,19 +36,21 @@ steps:
|
|||||||
path: /drone/src/node_modules
|
path: /drone/src/node_modules
|
||||||
commands:
|
commands:
|
||||||
# 构建项目
|
# 构建项目
|
||||||
- npm run build
|
- pnpm run build
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: node:22-alpine
|
image: node:22-alpine
|
||||||
depends_on: [build]
|
depends_on: [build]
|
||||||
|
volumes:
|
||||||
|
- name: node_modules
|
||||||
|
path: /drone/src/node_modules
|
||||||
commands:
|
commands:
|
||||||
# 启动服务
|
# 启动服务
|
||||||
- npm start
|
- pnpm start
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
PORT: 8001
|
PORT: 8001
|
||||||
|
|
||||||
# 触发条件
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
Loading…
Reference in New Issue
Block a user