Files
martial-mini/.drone.yml
Developer b63602e6f7
Some checks failed
continuous-integration/drone/push Build is failing
Fix: use local uni cli
2025-12-12 19:40:10 +08:00

39 lines
816 B
YAML

kind: pipeline
type: docker
name: martial-mini
trigger:
branch:
- main
- master
steps:
- name: build
image: node:16-alpine
commands:
- npm install
- ./node_modules/.bin/uni 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-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-mini || true
- docker rm martial-mini || true
- docker run -d --name martial-mini -p 8081:80 -v /var/www/martial-mini:/usr/share/nginx/html:ro nginx:alpine