Add deploy

This commit is contained in:
Nicolas Duhamel 2021-04-02 15:05:09 +02:00
parent 1a697ec828
commit b621859305

41
.drone.yml Normal 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 citadel.scene -o scene.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:
- ./scene.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 scene.pex ./services/bin/scene
- systemctl --user restart citadel@scene
when:
branch:
- master