automated_api/.drone.yml
lixin dbf6b424cb ci(drone): 更新部署路径
- 将 web_build_dir 的路径从 /index 改为 /automated
- 此修改是为了适应网站部署流程的变化
2025-01-17 11:42:58 +08:00

42 lines
1007 B
YAML

kind: pipeline
type: docker
name: deploy
#
volumes:
- name: node_modules
host:
path: /usr/local/blackend/node_modules
- name: web_build_dir
host:
path: /opt/1panel/apps/openresty/openresty/www/sites/120.48.5.80/automated
- name: yarn_cache
host:
path: /usr/local/blackend/yarn_cache
steps:
- name: build-project
image: node:22-alpine
depends_on: [clone]
mirror: https://docker.1panelproxy.com
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
- npm install -g pnpm
- pnpm config set registry https://registry.npmmirror.com
- pnpm install
- pnpm build
#- npm cache clean --force
# - npm install
# - npm run build:prod
trigger:
branch:
- main
event:
- push