Skip to content

Commit

Permalink
Refactor deployment workflow to enhance container deployment process …
Browse files Browse the repository at this point in the history
…with Docker commands
  • Loading branch information
Satish Surath committed Feb 4, 2025
1 parent 9d03d11 commit 2695a4a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/main_summarize-me.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
jobs:
build-and-deploy:
runs-on: self-hosted
# If you named your runner group something else, or labeled it, adjust accordingly
steps:
- name: Check out code
uses: actions/checkout@v3
Expand All @@ -27,7 +26,15 @@ jobs:
docker build -t ghcr.io/${{ github.repository }}:latest .
docker push ghcr.io/${{ github.repository }}:latest
- name: Deploy container using script
- name: Deploy container
run: |
chmod +x /home/satsur/update-summarizeme.io.sh
/home/satsur/update-summarizeme.io.sh
# Pull the newest image
docker pull ghcr.io/${{ github.repository }}:latest
# Stop old container (if running)
docker stop summarizeme.io || true
docker rm summarizeme.io || true
# Run new container
docker run -d --name summarizeme.io \
--env-file=/home/satsur/.env \
-p 8000:8000 \
ghcr.io/${{ github.repository }}:latest

0 comments on commit 2695a4a

Please sign in to comment.