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

This commit is contained in:
Ewen 2022-02-04 05:57:12 +01:00
parent 77a21f72b5
commit dbdc98fea4

View file

@ -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