Files
martial-admin-mini/.drone.yml
Developer 39bc88ce6d
Some checks failed
continuous-integration/drone/push Build is failing
fix: 升级 Node 版本到 18,修复 sass 兼容性问题
🤖 Generated with Claude Code
2025-12-13 23:14:54 +08:00

52 lines
1.1 KiB
YAML

kind: pipeline
type: docker
name: martial-admin-mini
trigger:
branch:
- main
- master
steps:
- name: build
image: node:18-alpine
environment:
NODE_OPTIONS: --max-old-space-size=4096
commands:
- npm install --legacy-peer-deps
- npm run build:h5
- ls -la dist/build/h5/
- name: clean
image: appleboy/drone-ssh
settings:
host: 154.30.6.21
username: root
key:
from_secret: ssh_key
script:
- rm -rf /var/www/martial-admin-mini/*
- 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