Files
martial-admin-mini/.drone.yml
Developer 6ea1c0ca8e
All checks were successful
continuous-integration/drone/push Build is passing
Fix: use local vue-cli-service
2025-12-12 19:40:14 +08:00

39 lines
930 B
YAML

kind: pipeline
type: docker
name: martial-admin-mini
trigger:
branch:
- main
- master
steps:
- name: build
image: node:16-alpine
commands:
- npm install
- ./node_modules/.bin/cross-env NODE_ENV=production UNI_PLATFORM=h5 ./node_modules/.bin/vue-cli-service build
- name: deploy
image: appleboy/drone-scp
settings:
host: 154.30.6.21
username: root
key:
from_secret: ssh_key
source: dist/build/h5/*
target: /var/www/martial-admin-mini
strip_components: 3
- name: restart
image: appleboy/drone-ssh
settings:
host: 154.30.6.21
username: root
key:
from_secret: ssh_key
script:
- docker stop martial-admin-mini || true
- docker rm martial-admin-mini || true
- docker run -d --name martial-admin-mini -p 8082:80 -v /var/www/martial-admin-mini:/usr/share/nginx/html:ro nginx:alpine