Skip to content

Commit

Permalink
Update deployment workflow to use a script for container deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Satish Surath committed Feb 4, 2025
1 parent 002d7dd commit ebe6046
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/main_summarize-me.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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 @@ -26,15 +27,7 @@ jobs:
docker build -t ghcr.io/${{ github.repository }}:latest .
docker push ghcr.io/${{ github.repository }}:latest
- name: Deploy container
- name: Deploy container using script
run: |
# 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=.env \
-p 8000:8000 \
ghcr.io/${{ github.repository }}:latest
chmod +x ../update-summarizeme.io.sh
../update-summarizeme.io.sh

0 comments on commit ebe6046

Please sign in to comment.