fix(ci): revert unstable SSH multiplexing and restore docker-compose upload
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 1m55s
Build & Deploy / 🏗️ Build (push) Successful in 11m18s
Build & Deploy / 🚀 Deploy (push) Successful in 24s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 2m58s
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-03-02 11:06:43 +01:00
parent 025906889c
commit ab15f7f35b

View File

@@ -351,16 +351,6 @@ 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 <<SSHEOF
Host alpha.mintel.me
ControlMaster auto
ControlPath /tmp/ssh-%r@%h:%p
ControlPersist 120
ServerAliveInterval 15
ServerAliveCountMax 3
SSHEOF
if [[ "$TARGET" == "production" ]]; then
SITE_DIR="/home/deploy/sites/mintel.me"
elif [[ "$TARGET" == "testing" ]]; then
@@ -371,15 +361,12 @@ jobs:
SITE_DIR="/home/deploy/sites/branch.mintel.me/${SLUG:-unknown}"
fi
# Open persistent connection
ssh -fN root@alpha.mintel.me
# Upload files (reuses existing connection)
# Upload files
ssh root@alpha.mintel.me "mkdir -p $SITE_DIR/directus/schema $SITE_DIR/directus/uploads $SITE_DIR/directus/extensions"
scp .env.deploy root@alpha.mintel.me:$SITE_DIR/$ENV_FILE
scp docker-compose.yml root@alpha.mintel.me:$SITE_DIR/docker-compose.yml
# Deploy (single SSH session for all docker commands)
# Deploy
DB_CONTAINER="${{ needs.prepare.outputs.project_name }}-postgres-db-1"
ssh root@alpha.mintel.me bash <<DEPLOYEOF
set -e
@@ -394,9 +381,6 @@ jobs:
docker system prune -f --filter 'until=24h'
DEPLOYEOF
# Cleanup multiplexed connection
ssh -O exit root@alpha.mintel.me 2>/dev/null || true
- name: 🧹 Post-Deploy Cleanup (Runner)
if: always()
run: docker builder prune -f --filter "until=1h"