690326:2236 Fixing Refactor ADR-019 Naming convention uuid #09
CI / CD Pipeline / build (push) Successful in 5m42s
CI / CD Pipeline / deploy (push) Failing after 20m17s

This commit is contained in:
2026-03-26 22:36:32 +07:00
parent 740c116b95
commit 54f6044e93
+17 -13
View File
@@ -71,24 +71,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup SSH and Deploy to QNAP
- name: 🔐 Setup SSH and Deploy to QNAP
run: |
# Ensure sshpass is available (install if needed)
if ! command -v sshpass &> /dev/null; then
apt-get update -qq && apt-get install -y -qq sshpass
fi
# Retry logic for SSH connection
max_attempts=3
attempt=1
while [ $attempt -le $max_attempts ]; do
echo "🚀 Deployment attempt $attempt/$max_attempts..."
if sshpass -p "${{ secrets.PASSWORD }}" ssh -o StrictHostKeyChecking=no \
-o ConnectTimeout=30 \
-o ServerAliveInterval=60 \
-p ${{ secrets.PORT }} ${{ secrets.USERNAME }}@${{ secrets.HOST }} << 'REMOTE_SCRIPT'
# Create remote deployment script
REMOTE_SCRIPT=$(cat << 'SCRIPT_EOF'
set -e
export PATH="/share/CACHEDEV1_DATA/.qpkg/container-station/bin:/opt/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
@@ -130,7 +121,20 @@ jobs:
./scripts/deploy.sh
echo "✓ Deployment completed successfully"
REMOTE_SCRIPT; then
SCRIPT_EOF
)
# Retry logic for SSH connection
max_attempts=3
attempt=1
while [ $attempt -le $max_attempts ]; do
echo "🚀 Deployment attempt $attempt/$max_attempts..."
if echo "$REMOTE_SCRIPT" | sshpass -p "${{ secrets.PASSWORD }}" ssh -o StrictHostKeyChecking=no \
-o ConnectTimeout=30 \
-o ServerAliveInterval=60 \
-p ${{ secrets.PORT }} ${{ secrets.USERNAME }}@${{ secrets.HOST }} 'bash -s'; then
echo "✅ Deployment successful!"
exit 0
else