From cb4afe2e914449f433185893934d7d421018fee1 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 2 Mar 2026 00:11:29 +0100 Subject: [PATCH] fix(ci): consolidate deploy SSH into single multiplexed session to avoid rate limiting --- .gitea/workflows/deploy.yml | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 2ab371c..5865bba 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -348,6 +348,16 @@ jobs: chmod 600 ~/.ssh/id_ed25519 ssh-keyscan -H alpha.mintel.me >> ~/.ssh/known_hosts 2>/dev/null + # SSH multiplexing: reuse a single connection for all commands + cat >> ~/.ssh/config </dev/null || true" + docker exec $DB_CONTAINER psql -U $postgres_DB_USER -d $postgres_DB_NAME -c "DELETE FROM payload_migrations WHERE batch = -1;" 2>/dev/null || true + docker system prune -f --filter 'until=24h' + DEPLOYEOF - ssh root@alpha.mintel.me "docker system prune -f --filter 'until=24h'" + # Cleanup multiplexed connection + ssh -O exit root@alpha.mintel.me 2>/dev/null || true - name: 🧹 Post-Deploy Cleanup (Runner) if: always()