Skip to content

Commit

Permalink
Update deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Somnath-Chattaraj authored Jul 30, 2024
1 parent 1767c12 commit d9748a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ jobs:
- name: Verify Pushed Image
run: docker pull somnath910/statuscode1:latest # Replace with your Docker Hub username and repository

deploy:
runs-on: ubuntu-latest
needs: build-and-push

steps:
- name: Deploy to EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
sudo systemctl restart docker
sudo docker pull somnath910/statuscode1:latest
sudo docker stop web-app || true
sudo docker rm web-app || true
Expand All @@ -50,3 +56,5 @@ jobs:
-e BREVO_PORT=${{ secrets.BREVO_PORT }} \
-p 3005:3000 \
somnath910/statuscode1:latest
sudo docker ps -a
sudo docker logs web-app

0 comments on commit d9748a5

Please sign in to comment.