automated_admin/.drone.yml
lixin 03276bca8e
Some checks reported errors
continuous-integration/drone/push Build was killed
build: 更新构建镜像为 Alpine 版本
- 将 Node.js 镜像从 node:22 更改为 node:22-alpine
- 添加镜像加速器配置以提高下载速度
2025-01-10 16:33:33 +08:00

41 lines
951 B
YAML

kind: pipeline
type: docker
name: deploy
#
volumes:
- name: node_modules
host:
path: /usr/local/frontend/node_modules
- name: web_build_dir
host:
path: /usr/local/frontend/automated_admin
- name: yarn_cache
host:
path: /usr/local/frontend/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
- yarn config set registry https://registry.npmmirror.com
- yarn install
- yarn build:prod
#- npm cache clean --force
# - npm install
# - npm run build:prod
trigger:
branch:
- main
event:
- push