Skip to content

Commit

Permalink
Merge pull request #97 from GeneralMagicio/feat/force-recreate-main-d…
Browse files Browse the repository at this point in the history
…eploy

Force recreate on prodction deploy only scripts
  • Loading branch information
geleeroyale authored Oct 14, 2024
2 parents ca98e80 + 2f70c31 commit e3df161
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main-deploy-only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: main-deploy-only

on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: SSH and Redeploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_HOST }}
username: ${{ secrets.PRODUCTION_USERNAME }}
key: ${{ secrets.PRODUCTION_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd QAcc-BE
git checkout main
git pull
docker compose -f docker-compose-production.yml pull
docker compose -f docker-compose-production.yml up --force-recreate -d
docker image prune -a --force
4 changes: 2 additions & 2 deletions .github/workflows/main-publish-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: publish-deploy-main-branch

on:
workflow_dispatch:

jobs:
run-linters:
name: Run linters
Expand Down Expand Up @@ -66,5 +66,5 @@ jobs:
git checkout main
git pull
docker compose -f docker-compose-production.yml pull
docker compose -f docker-compose-production.yml up -d
docker compose -f docker-compose-production.yml up --force-recreate -d
docker image prune -a --force

0 comments on commit e3df161

Please sign in to comment.