From 56738010b8607851b399ad4b6643a1a9c33db6cd Mon Sep 17 00:00:00 2001 From: devout-coder Date: Sat, 7 Sep 2024 18:31:58 +0530 Subject: [PATCH] changed commands finally --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index edcc304..81053bb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -58,8 +58,9 @@ jobs: - name: SSH into EC2 instance and pull run: | ssh -i ~/.ssh/id_rsa ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << 'EOF' + aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.ECR_REPOSITORY }} cd ~/doneify_dir - docker compose pull doneify + docker compose pull ${{ secrets.ECR_REPOSITORY }}/my_repo docker compose down docker compose up -d EOF