deploy
Some checks failed
Build & Deploy KLZ Cables / deploy (push) Failing after 3m48s

This commit is contained in:
2026-01-25 11:47:00 +01:00
parent 3582370449
commit 339a272105

View File

@@ -188,13 +188,28 @@ jobs:
# Make script executable and copy to server
chmod +x /tmp/deploy.sh
# Copy deployment script to server
scp -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no -o IPQoS=0x00 /tmp/deploy.sh deploy@alpha.mintel.me:/tmp/deploy.sh
# Copy deployment script to server with keep-alive and timeout
scp -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no -o IPQoS=0x00 -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -o ConnectTimeout=30 /tmp/deploy.sh deploy@alpha.mintel.me:/tmp/deploy.sh
# Execute deployment script on server
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no -o IPQoS=0x00 deploy@alpha.mintel.me "
set -e
bash /tmp/deploy.sh
"
# Execute deployment script on server with keep-alive and timeout
# Retry up to 3 times if connection is lost
for i in {1..3}; do
echo "Attempt $i of 3..."
if ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no -o IPQoS=0x00 -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -o ConnectTimeout=30 -o ServerAliveTimeout=300 deploy@alpha.mintel.me "
set -e
bash /tmp/deploy.sh
"; then
echo "✓ Deployment successful on attempt $i"
break
else
echo "✗ Deployment failed on attempt $i"
if [ $i -eq 3 ]; then
echo "All deployment attempts failed"
exit 1
fi
echo "Retrying in 10 seconds..."
sleep 10
fi
done
echo "Deployment completed"