From 5f7abda368a719c718dbd8bb95d0eb0859fd5e6c Mon Sep 17 00:00:00 2001 From: Martin op iMac Date: Mon, 30 Oct 2023 08:16:20 +0100 Subject: [PATCH] Added ssh key to workflow secret 1 --- .github/workflows/continuous-deployment.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index 533a500..10e7d40 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -28,7 +28,7 @@ jobs: python -m pip install --upgrade pip pip install pytest pip install -r requirements.txt - + - name: Run tests run: | @@ -39,9 +39,7 @@ jobs: mkdir -p ~/.ssh ssh-keyscan 172.233.46.163 >> ~/.ssh/known_hosts - - name: Deploy to Linode + - name: Deploy to Linode if: ${{ success() }} run: | - eval "$(ssh-agent -s)" - 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' + ssh 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' \ No newline at end of file