'init'
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
XinWei 2024-08-07 15:42:25 +08:00
parent f1c5ac864a
commit c35d8d7c74

39
.drone.yml Normal file
View File

@ -0,0 +1,39 @@
kind: pipeline
type: docker
name: zymall-mobile
steps:
- name: build
image: node:18.18.0
volumes:
- name: build-file
path: /build/dist-prod
commands:
- npm install --registry=https://registry.npmmirror.com/
- npm run build:prod
- cp -r dist-prod/. /build/dist-prod
- name: remote_transmit
image: appleboy/drone-ssh # SSH工具镜像
settings:
host: 101.43.112.107 # 远程连接地址
username: root # 远程连接账号
password:
from_secret: ssh_password # 从Secret中读取SSH密码
port: 22 # 远程连接端口
command_timeout: 5m # 远程执行命令超时时间
script:
- scp -r /zymall-mobile/dist-prod root@1.14.205.126:/root/zyEjmall/zyEj-admin-vue3
volumes: # 定义流水线挂载目录,用于共享数据
- name: build-file
host:
path: /zymall-mobile/dist-prod # 从宿主机中挂载的目录