2025-01-10 16:26:34 +08:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: deploy
|
2025-01-10 16:28:29 +08:00
|
|
|
#
|
2025-01-10 16:26:34 +08:00
|
|
|
volumes:
|
|
|
|
- name: node_modules
|
|
|
|
host:
|
|
|
|
path: /usr/local/frontend/node_modules
|
|
|
|
- name: web_build_dir
|
|
|
|
host:
|
2025-01-10 17:45:15 +08:00
|
|
|
path: /opt/1panel/apps/openresty/openresty/www/sites/120.48.5.80/index
|
2025-01-10 16:26:34 +08:00
|
|
|
- name: yarn_cache
|
|
|
|
host:
|
|
|
|
path: /usr/local/frontend/yarn_cache
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build-project
|
2025-01-10 16:33:33 +08:00
|
|
|
image: node:22-alpine
|
2025-01-10 16:26:34 +08:00
|
|
|
depends_on: [clone]
|
2025-01-10 16:33:33 +08:00
|
|
|
mirror: https://docker.1panelproxy.com
|
2025-01-10 16:26:34 +08:00
|
|
|
volumes:
|
|
|
|
- name: node_modules
|
|
|
|
path: /drone/src/node_modules
|
|
|
|
- name: web_build_dir
|
|
|
|
path: /drone/src/dist
|
|
|
|
- name: yarn_cache
|
|
|
|
path: /usr/local/share/.cache/yarn/v6
|
|
|
|
commands:
|
|
|
|
# - npm config set registry https://registry.npm.taobao.org
|
2025-01-17 11:48:00 +08:00
|
|
|
- npm install -g pnpm
|
2025-01-17 11:46:47 +08:00
|
|
|
- pnpm config set registry https://registry.npmmirror.com
|
|
|
|
- pnpm install
|
|
|
|
- pnpm build
|
2025-01-10 16:26:34 +08:00
|
|
|
#- npm cache clean --force
|
|
|
|
# - npm install
|
|
|
|
# - npm run build:prod
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|