diff --git a/.drone.yml b/.drone.yml index 2d9b152..9857d56 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,6 +2,11 @@ kind: pipeline type: docker name: default +volumes: +- name: build + host: + path: /home/citadel/build/ + steps: - name: Build image: python:3.9 @@ -12,34 +17,12 @@ steps: - pip install . - pex ./ -m yamaha2mqtt -o yamaha2mqtt.pex - name: Deploy - image: appleboy/drone-scp - settings: - host: - - gavarni.jombi.fr - user: citadel - # ssh-key: - # from_secret: ssh_key - password: - from_secret: ssh_password - 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 - password: - from_secret: ssh_password - script: - - mv yamaha2mqtt.pex ./services/bin/yamaha2mqtt - - systemctl --user restart citadel@yamaha2mqtt + image: python:3.9 + volumes: + - name: build + path: /build + commands: + - cp ./yamaha2mqtt.pex /build/yamaha2mqtt when: branch: - master