From 377f583ff17aeedf55910b8a5131d0b3d8361908 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 26 Jan 2026 11:08:51 +0100 Subject: [PATCH] deploy --- .gitea/workflows/deploy.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index a82a9992..2da78029 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -46,11 +46,14 @@ jobs: ssh-keyscan -H alpha.mintel.me >> ~/.ssh/known_hosts 2>/dev/null - ssh -o StrictHostKeyChecking=accept-new deploy@alpha.mintel.me "bash -s" << 'ENDSSH' - set -e - echo "${{ secrets.REGISTRY_PASS }}" | docker login registry.infra.mintel.me -u "${{ secrets.REGISTRY_USER }}" --password-stdin - cd /home/deploy/sites/klz-cables.com - docker compose pull - docker compose up -d --force-recreate --remove-orphans - docker image prune -f - ENDSSH \ No newline at end of file + # Use SSH with connection keepalive and execute commands directly + ssh -o StrictHostKeyChecking=accept-new \ + -o ServerAliveInterval=30 \ + -o ServerAliveCountMax=3 \ + -o ConnectTimeout=10 \ + deploy@alpha.mintel.me \ + "echo '${{ secrets.REGISTRY_PASS }}' | docker login registry.infra.mintel.me -u '${{ secrets.REGISTRY_USER }}' --password-stdin && \ + cd /home/deploy/sites/klz-cables.com && \ + docker compose pull && \ + docker compose up -d --force-recreate --remove-orphans && \ + docker image prune -f" \ No newline at end of file