Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
ewen 2022-02-04 07:42:32 +00:00
parent 43527f177d
commit 495d6561ee

View file

@ -19,27 +19,8 @@ steps:
# layout: hugo/layout # layout: hugo/layout
# output: hugo/public # output: hugo/public
# theme: hugo/themes/hugo-theme-hello-friend-ng/ # theme: hugo/themes/hugo-theme-hello-friend-ng/
url: https://blog.goe.land url: https://ewen.korr.bzh
- name: read
image: alpine/git
commands:
- ls
- ls public/
#- name: deploie_tes_ailes
# image: appleboy/drone-scp
# 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}
# source: public/
# strip_components: 1
# target: {from_secret: SCP_TARGET_DIRECTORY}
# #target: /srv/apps/blog/data/www/public
# rm: true
- name: deploy - name: deploy
image: alpine/git image: alpine/git
environment: environment:
@ -51,8 +32,6 @@ steps:
from_secret: SCP_USER from_secret: SCP_USER
SCP_PORT: SCP_PORT:
from_secret: SCP_PORT from_secret: SCP_PORT
#SCP_TARGET_DIRECTORY:
# from_secret: SCP_TARGET_DIRECTORY
SCP_COMMAND: SCP_COMMAND:
from_secret: SCP_COMMAND from_secret: SCP_COMMAND
commands: commands:
@ -61,21 +40,4 @@ steps:
- ssh-keyscan -t rsa -p $SCP_PORT $SCP_HOSTNAME >> $HOME/.ssh/known_hosts - ssh-keyscan -t rsa -p $SCP_PORT $SCP_HOSTNAME >> $HOME/.ssh/known_hosts
- chmod -R og-rw $HOME/.ssh/ - chmod -R og-rw $HOME/.ssh/
- scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public $SCP_USER@$SCP_HOSTNAME:~/ - scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public $SCP_USER@$SCP_HOSTNAME:~/
- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf /srv/apps/blog/data/www/public/*; mv ~/public/* /srv/apps/blog/data/www/public/; docker-compose -f /srv/apps/blog/docker-compose.yml restart; rm -rvf ~/public' - ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf /srv/apps/blog/data/www/publcic/*; mv ~/public/* /srv/apps/blog/data/www/public/; docker-compose -f /srv/apps/blog/docker-compose.yml restart; rm -rvf ~/public'
#- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf $SCP_TARGET_DIRECTORY/*; mv ~/public/* $SCP_TARGET_DIRECTORY; ~/$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