From add13e4c3cfed5de569db459f06d26ec24d2805a Mon Sep 17 00:00:00 2001 From: surtur Date: Sun, 8 Mar 2020 07:28:59 +0100 Subject: [PATCH] give chance to official drone-rsync --- .drone.yml | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/.drone.yml b/.drone.yml index 00379ab..e765d67 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,31 +22,21 @@ name: deploy steps: - name: hugo-rsync-deploy pull: always - image: immawanderer/archlinux-hugo:latest - environment: - HUGO_KEY: - from_secret: hugo_key - HUGO_USER: - from_secret: hugo_user - HUGO_HOST: + image: drillster/drone-rsync + hosts: "$HUGO_HOST" from_secret: hugo_host - HUGO_DIR: + user: HUGO_USER + from_secret: hugo_user ++ key: "$HUGO_KEY" + from_secret: hugo_key + source: ./public + target: $HUGO_DIR from_secret: hugo_dir - commands: - - git submodule init - - git submodule update - - pacman -Sy scp - - rm -rfv ./public - - hugo --gc=true --minify - - echo "$HUGO_KEY" > ~/hugo_deploy - - chmod -v 600 ~/hugo_deploy #hellyeah - - ssh -v -i ~/hugo_deploy -o KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 -o PreferredAuthentications=publickey -o PasswordAuthentication=no -c aes256-ctr,aes256-cbc -o StrictHostKeyChecking=no $HUGO_USER@$HUGO_HOST "rm -rfv $HUGO_DIR; mkdir -pv $HUGO_DIR" || true - - scp -v -i ~/hugo_deploy -o KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 -o PreferredAuthentications=publickey -o PasswordAuthentication=no -c aes256-ctr,aes256-cbc -o StrictHostKeyChecking=no public/* $HUGO_USER@$HUGO_HOST:$HUGO_DIR || true - - shred -zuv 7 ~/hugo_deploy || true when: status: - success + --- kind: pipeline name: notifications