Skip to content

Commit

Permalink
on review
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegGsk committed Oct 4, 2024
1 parent 288fcdd commit eaf9d40
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/prod_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master

env:
DEPLOY_PATH: adaptive_hockey_federation
REGISTRY: ghcr.io
Expand Down Expand Up @@ -95,9 +95,12 @@ jobs:
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
if [ -d /home/${{ secrets.USERNAME }}/${{ env.DEPLOY_PATH }}/infra ]; then
STATUS="$(systemctl is-active adaptive_hockey_federation.service)"
if [ "${STATUS}" = "active" ]; then
sudo systemctl stop adaptive_hockey_federation.service
echo "Stopping old containers"
else
echo "No active containers"
fi
- name: Copy infra via ssh
Expand All @@ -111,7 +114,7 @@ jobs:
target: "${{ env.DEPLOY_PATH }}/infra"
rm: true
strip_components: 1

- name: Execute commands on VPS
uses: appleboy/ssh-action@master
with:
Expand Down

0 comments on commit eaf9d40

Please sign in to comment.