From 07e01b63c41613625bf525e912625e4b8c90d40b Mon Sep 17 00:00:00 2001 From: idanoo Date: Mon, 12 Sep 2022 17:13:17 +1200 Subject: [PATCH] update deployment --- .woodpecker.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index cc34960..4cd0d91 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,11 +9,12 @@ pipeline: - dpkg -i hugo_extended_$${HUGO_VERSION}_Linux-64bit.deb - hugo - echo "Deploying new version" + - mkdir -p /root/.ssh - ssh-keygen -R $M2_HOST - - echo $M2_DEPLOY_KEY > privkey - - scp -i privkey -r public root@$M2_HOST:/var/www/m2.nz/ - - ssh -i privkey root@M2_HOST 'sudo systemctl reload nginx.service' - - rm -fr privkey + - echo $M2_DEPLOY_KEY > /root/.ssh/privkey + - scp -i /root/.ssh/privkey -r public root@$M2_HOST:/var/www/m2.nz/ + - ssh -i /root/.ssh/privkey root@M2_HOST 'sudo systemctl reload nginx.service' + - rm -fr /root/.ssh/privkey secrets: [ m2_deploy_secret, m2_host ] \ No newline at end of file