deploy
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 3m30s

This commit is contained in:
2026-01-26 15:36:46 +01:00
parent 9c26ddddbf
commit e648d30767

View File

@@ -141,13 +141,8 @@ jobs:
echo "📡 Connecting to server and executing deployment commands..." echo "📡 Connecting to server and executing deployment commands..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Execute remote commands with error handling and logging using bash -s # Create deployment script
ssh -o StrictHostKeyChecking=accept-new \ cat > /tmp/deploy.sh << 'DEPLOYEOF'
-o ServerAliveInterval=30 \
-o ServerAliveCountMax=3 \
-o ConnectTimeout=10 \
-v \
deploy@alpha.mintel.me bash -s << 'ENDSSH'
set -ex set -ex
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━' echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
echo '📡 Remote Deployment Started' echo '📡 Remote Deployment Started'
@@ -155,7 +150,7 @@ jobs:
echo '' echo ''
echo '🔐 Logging into registry on remote server...' echo '🔐 Logging into registry on remote server...'
echo '${{ secrets.REGISTRY_PASS }}' | docker login registry.infra.mintel.me -u '${{ secrets.REGISTRY_USER }}' --password-stdin echo 'REGISTRY_PASS_PLACEHOLDER' | docker login registry.infra.mintel.me -u 'REGISTRY_USER_PLACEHOLDER' --password-stdin
echo '✅ Remote registry login completed' echo '✅ Remote registry login completed'
echo '' echo ''
@@ -186,7 +181,18 @@ jobs:
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━' echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
echo '✅ Remote Deployment Completed Successfully' echo '✅ Remote Deployment Completed Successfully'
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━' echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
ENDSSH DEPLOYEOF
# Replace placeholders with actual secrets
sed -i "s/REGISTRY_USER_PLACEHOLDER/${{ secrets.REGISTRY_USER }}/g" /tmp/deploy.sh
sed -i "s/REGISTRY_PASS_PLACEHOLDER/${{ secrets.REGISTRY_PASS }}/g" /tmp/deploy.sh
# Execute remote commands
ssh -o StrictHostKeyChecking=accept-new \
-o ServerAliveInterval=30 \
-o ServerAliveCountMax=3 \
-o ConnectTimeout=10 \
deploy@alpha.mintel.me 'bash -s' < /tmp/deploy.sh
DEPLOY_EXIT_CODE=$? DEPLOY_EXIT_CODE=$?
echo "" echo ""