Skip to content

Commit

Permalink
added deploy to EC2
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-flick committed Sep 30, 2024
1 parent 8064d54 commit c69b835
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,17 @@ jobs:
push: true
tags: prashantflick/user-paytm:latest

# - name: Verify Pushed Image
# run: docker pull prashantflick/user-paytm:latest
- name: Verify Pushed Image
run: docker pull prashantflick/user-paytm:latest

- name: Deploy to EC2
uses: appleboy/ssh-action@master
with:
host: ${{secrets.SSH_HOST}}
username: ${{secrets.SSH_USERNAME}}
key: ${{secrets.SSH_KEY}}
script: |
sudo docker pull prashantflick/user-paytm:latest
sudo docker stop user-app || true
sudo docker rm user-app || true
suco docker run -d --name user-app -p 3000:3000 prashantflick/user-paytm:latest

0 comments on commit c69b835

Please sign in to comment.