diff --git a/.github/workflows/main-deploy-only.yml b/.github/workflows/main-deploy-only.yml new file mode 100644 index 000000000..5fbca1df7 --- /dev/null +++ b/.github/workflows/main-deploy-only.yml @@ -0,0 +1,23 @@ +name: main-deploy-only + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: SSH and Redeploy + uses: appleboy/ssh-action@v1.0.0 + 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 diff --git a/.github/workflows/main-publish-deploy.yml b/.github/workflows/main-publish-deploy.yml index d36f2ea99..a4bba2192 100644 --- a/.github/workflows/main-publish-deploy.yml +++ b/.github/workflows/main-publish-deploy.yml @@ -2,7 +2,7 @@ name: publish-deploy-main-branch on: workflow_dispatch: - + jobs: run-linters: name: Run linters @@ -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