Add CI/CD config
Some checks failed
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Developer
2025-12-12 19:00:02 +08:00
parent 7807f4b3e4
commit 00a6b272b7
2 changed files with 48 additions and 0 deletions

37
.drone.yml Normal file
View File

@@ -0,0 +1,37 @@
kind: pipeline
type: docker
name: martial-mini
trigger:
branch:
- main
- master
steps:
- name: build
image: plugins/docker
settings:
repo: martial/mini
tags: latest
dockerfile: Dockerfile
daemon_off: true
volumes:
- name: docker
path: /var/run/docker.sock
- name: deploy
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 martial/mini:latest
volumes:
- name: docker
host:
path: /var/run/docker.sock