Add auto deploy
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nicolas Duhamel 2021-07-08 15:40:34 +02:00
parent 4820bbfc76
commit 27f2ce96e6

41
.drone.yml Normal file
View File

@ -0,0 +1,41 @@
kind: pipeline
type: docker
name: default
steps:
- name: Build
image: python
commands:
- apt-get update
- apt-get install python-systemd python3-systemd libsystemd-dev
- pip install pex
- pip install .
- pex ./ -m yamaha2mqtt -o yamaha2mqtt.pex
- name: Deploy
image: appleboy/drone-scp
settings:
host:
- gavarni.jombi.fr
user: citadel
key:
from_secret: ssh_key
port: 22
command_timeout: 2m
target: /home/citadel
source:
- ./yamaha2mqtt.pex
strip_components: 1
- name: ssh commands
image: appleboy/drone-ssh
settings:
host: gavarni.jombi.fr
username: citadel
port: 22
key:
from_secret: ssh_key
script:
- mv yamaha2mqtt.pex ./services/bin/yamaha2mqtt
# - systemctl --user restart citadel@yamaha2mqtt
when:
branch:
- master