From 9cd379d9ccf8eb0c4972f4febdc3ef2ededa9d54 Mon Sep 17 00:00:00 2001 From: can kurttekin Date: Tue, 19 Nov 2024 10:46:20 +0300 Subject: [PATCH] add identify file to ssh command --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 57307c7b..317622e8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -40,9 +40,9 @@ jobs: EC2_HOST: ${{ secrets.EC2_HOST }} run: | echo "Testing SSH Connection..." - ssh -o StrictHostKeyChecking=no $EC2_USER@$EC2_HOST "echo 'Connected'" + ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no $EC2_USER@$EC2_HOST "echo 'Connected'" echo "Copying files to EC2..." - scp -o StrictHostKeyChecking=no -r backend/docker-compose.yml $EC2_USER@$EC2_HOST:~/job-application-tracker/ + scp -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -r backend/docker-compose.yml $EC2_USER@$EC2_HOST:~/job-application-tracker/ # Create .env file on EC2 - name: Configure Environment Variables