From 34b97c4e182aa78f2190ad8b484720ab84abfbe1 Mon Sep 17 00:00:00 2001 From: Martin de Bes Date: Sun, 29 Oct 2023 23:16:31 +0100 Subject: [PATCH] workflow fix ssh forwarding --- .github/workflows/continuous-deployment.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index 67a9bce..8c4723f 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -40,11 +40,7 @@ jobs: - name: Deploy to Linode if: ${{ success() }} - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | eval "$(ssh-agent -s)" - echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/deploy_key - chmod 600 /tmp/deploy_key - ssh-add /tmp/deploy_key + echo "${{ secrets.SSH_PRIVATE_KEY }}" | ssh-add - ssh -o "StrictHostKeyChecking no" -A root@172.233.46.163 'cd /var/www/html/ && git pull origin main && systemctl restart gunicorn && systemctl restart nginx && gunicorn main:app --bind 0.0.0.0'