Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
shaheennabi committed Dec 21, 2024
1 parent b864c69 commit 0be4091
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ jobs:
- name: Deploy to EC2
run: |
ssh -i ${{ secrets.SSH_KEY }} ubuntu@44.210.129.170 \
echo "${{ secrets.SSH_KEY }}" > ssh_key
chmod 600 ssh_key
ssh -i ssh_key -o StrictHostKeyChecking=no ubuntu@44.203.254.197 \
'docker pull ${{ secrets.AWS_ECR_REPO_URI }}:latest && \
docker stop streamlit-app || true && \
docker rm streamlit-app || true && \
docker run -d --name streamlit-app -p 8501:8501 ${{ secrets.AWS_ECR_REPO_URI }}:latest'
- name: Cleanup Old Images
if: always()
run: |
docker system prune -af
rm ssh_key

0 comments on commit 0be4091

Please sign in to comment.