From dbdc98fea4cc0f9d7bf58ba2f7897a876251900b Mon Sep 17 00:00:00 2001 From: Ewen Date: Fri, 4 Feb 2022 05:57:12 +0100 Subject: [PATCH] deploy --- .drone.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.drone.yml b/.drone.yml index c188f46..3e5c2cf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -53,26 +53,29 @@ steps: from_secret: SCP_PORT SCP_TARGET: from_secret: SCP_TARGET_DIRECTORY + SCP_COMMAND: + from_secret: SCP_COMMAND commands: - - ls + - ls public/ - mkdir $HOME/.ssh - echo "$SCP_KEY" > $HOME/.ssh/id_rsa - ssh-keyscan -t rsa -p $SCP_PORT $SCP_HOSTNAME >> $HOME/.ssh/known_hosts - chmod -R og-rw $HOME/.ssh/ - - scp -rP $SCP_PORT -i $HOME/.ssh/id_rsa public/ $SCP_USER@$SCP_HOSTNAME:$SCP_TARGET_DIRECTORY + - scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public/ $SCP_USER@$SCP_HOSTNAME:$SCP_TARGET_DIRECTORY + - ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME '$SCP_COMMAND' -- name: rereveille_toi - image: appleboy/drone-ssh - settings: - host: - from_secret: SCP_HOSTNAME - port: - from_secret: SCP_PORT - username: - from_secret: SCP_USERNAME - #password: {from_secret: SCP_PASSWORD} - key: - from_secret: SCP_KEY - script: - #- {from_secret: SSH_COMMAND} - - docker-compose -f /srv/apps/blog/docker-compose.yml restart + #- name: rereveille_toi + # image: appleboy/drone-ssh + # settings: + # host: + # from_secret: SCP_HOSTNAME + # port: + # from_secret: SCP_PORT + # username: + # from_secret: SCP_USERNAME + # #password: {from_secret: SCP_PASSWORD} + # key: + # from_secret: SCP_KEY + # script: + # #- {from_secret: SSH_COMMAND} + # - docker-compose -f /srv/apps/blog/docker-compose.yml restart