mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-18 16:28:55 +00:00
Create drone config
-- --check [ci test] build and deploy [ci test] change ssh key source [ci test] avoid duplicates [ci test] run test pipeline Restrict deployment to master branch
This commit is contained in:
parent
328bb44d23
commit
e5a5b88980
1 changed files with 51 additions and 0 deletions
51
.drone.yml
Normal file
51
.drone.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: format_check
|
||||||
|
image: rust:1.41
|
||||||
|
commands:
|
||||||
|
- rustup component add rustfmt
|
||||||
|
- cargo fmt -- --check
|
||||||
|
- name: cargo_check
|
||||||
|
image: rust:1.41
|
||||||
|
commands:
|
||||||
|
- cargo check
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: deploy
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_release
|
||||||
|
image: rust:1.41
|
||||||
|
commands:
|
||||||
|
- cargo build --release
|
||||||
|
- name: deploy
|
||||||
|
image: drillster/drone-rsync
|
||||||
|
environment:
|
||||||
|
RSYNC_KEY:
|
||||||
|
from_secret: rsync_key
|
||||||
|
settings:
|
||||||
|
user: natsukagami
|
||||||
|
args: -zz
|
||||||
|
hosts:
|
||||||
|
- "104.248.149.133" # Youmubot
|
||||||
|
source:
|
||||||
|
- ./target/release/youmubot
|
||||||
|
target:
|
||||||
|
- ~/youmubot/youmubot
|
||||||
|
script:
|
||||||
|
- systemctl --user restart youmubot
|
Loading…
Add table
Reference in a new issue