Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
soham901 committed Oct 2, 2024
1 parent 545fc70 commit 503ab7f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy-to-ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:

- name: Build and push the image
run: |
docker build -t my-python-app .
docker tag my-python-app ${{ secrets.DOCKER_USERNAME }}/my-python-app
docker push ${{ secrets.DOCKER_USERNAME }}/my-python-app
sudo docker build -t my-python-app .
sudo docker tag my-python-app ${{ secrets.DOCKER_USERNAME }}/my-python-app
sudo docker push ${{ secrets.DOCKER_USERNAME }}/my-python-app
- name: SSH Remote Commands
uses: appleboy/ssh-action@v1.0.3
Expand All @@ -33,7 +33,7 @@ jobs:
port: 22
script: |
# Your deployment commands here
docker pull ${{ secrets.DOCKER_USERNAME }}/my-python-app
docker stop my-python-app || true
docker rm my-python-app || true
docker run -d -p 8000:8000 ${{ secrets.DOCKER_USERNAME }}/my-python-app
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/my-python-app
sudo docker stop my-python-app || true
sudo docker rm my-python-app || true
sudo docker run -d -p 8000:8000 ${{ secrets.DOCKER_USERNAME }}/my-python-app

0 comments on commit 503ab7f

Please sign in to comment.