diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f6e7224..cca3e62 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -55,13 +55,10 @@ jobs: run: | ssh-keyscan -H ${{ secrets.EC2_HOST }} >> ~/.ssh/known_hosts - - name: SSH into EC2 instance and execute a command + - name: SSH into EC2 instance and pull run: | ssh -i ~/.ssh/id_rsa ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} - - - name: Pull images and deploy - run: | - cd ~/doneify_dir - docker-compose pull doneify - docker-compose down - docker-compose up -d + cd ~/doneify_dir + docker-compose pull doneify + docker-compose down + docker-compose up -d