change cd for front
Some checks failed
CD / build-and-push (push) Failing after 10s
CD / deploy (push) Has been skipped

This commit is contained in:
RM
2026-10-15 02:01:10 +03:00
parent e9204516cf
commit 7ad5361a61
3 changed files with 7 additions and 30 deletions

View File

@@ -37,10 +37,12 @@ jobs:
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_USER: ${{ secrets.SSH_USER }}
DEPLOY_DIR: ${{ secrets.SSH_DEPLOY_DIR }}
COMPOSE_FILE: ${{ secrets.COMPOSE_FILE }}
run: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
PORT="${SSH_PORT:-22}"
FILE="${COMPOSE_FILE:-docker-compose.yml}"
ssh -i ~/.ssh/deploy_key -p "$PORT" -o StrictHostKeyChecking=no -o BatchMode=yes "$SSH_USER@$SSH_HOST" \
"cd $DEPLOY_DIR && git pull --ff-only && docker compose pull && sudo -n systemctl stop torgi && sudo -n systemctl start torgi && sudo -n systemctl is-active torgi"
"cd $DEPLOY_DIR && git pull --ff-only && docker compose -f \"$FILE\" pull && sudo -n systemctl stop torgi && sudo -n systemctl start torgi && sudo -n systemctl is-active torgi"