From 288fcddc3bd9f2c4845c5c85de8bd0abe41c1948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=93=D0=BE=D0=B2=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D1=81=D0=BA=D0=B8=D0=B9?= Date: Thu, 3 Oct 2024 21:05:06 +0500 Subject: [PATCH] fix deploy --- .github/workflows/prod_deploy.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/prod_deploy.yaml b/.github/workflows/prod_deploy.yaml index 3f8fab04..790c3b85 100644 --- a/.github/workflows/prod_deploy.yaml +++ b/.github/workflows/prod_deploy.yaml @@ -87,6 +87,19 @@ jobs: rm -r infra/stage rm -r infra/dev + - name: Stopping old containers + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + passphrase: ${{ secrets.SSH_PASSPHRASE }} + script: | + if [ -d /home/${{ secrets.USERNAME }}/${{ env.DEPLOY_PATH }}/infra ]; then + sudo systemctl stop adaptive_hockey_federation.service + echo "Stopping old containers" + fi + - name: Copy infra via ssh uses: appleboy/scp-action@master with: