690326:2236 Fixing Refactor ADR-019 Naming convention uuid #09
This commit is contained in:
@@ -71,24 +71,15 @@ jobs:
|
|||||||
- name: � Checkout
|
- name: � Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: � Setup SSH and Deploy to QNAP
|
- name: 🔐 Setup SSH and Deploy to QNAP
|
||||||
run: |
|
run: |
|
||||||
# Ensure sshpass is available (install if needed)
|
# Ensure sshpass is available (install if needed)
|
||||||
if ! command -v sshpass &> /dev/null; then
|
if ! command -v sshpass &> /dev/null; then
|
||||||
apt-get update -qq && apt-get install -y -qq sshpass
|
apt-get update -qq && apt-get install -y -qq sshpass
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Retry logic for SSH connection
|
# Create remote deployment script
|
||||||
max_attempts=3
|
REMOTE_SCRIPT=$(cat << 'SCRIPT_EOF'
|
||||||
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'
|
|
||||||
set -e
|
set -e
|
||||||
export PATH="/share/CACHEDEV1_DATA/.qpkg/container-station/bin:/opt/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
|
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
|
./scripts/deploy.sh
|
||||||
|
|
||||||
echo "✓ Deployment completed successfully"
|
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!"
|
echo "✅ Deployment successful!"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user