690326:2236 Fixing Refactor ADR-019 Naming convention uuid #09
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user