From 3cc774ed05ea96d992083e636614f51909427f44 Mon Sep 17 00:00:00 2001 From: iDefineHD Date: Sun, 11 Jan 2026 00:47:09 +0000 Subject: [PATCH] Add deployment with hardcoded credentials placeholder --- .gitea/workflows/deploy.yml | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index afa0de7..1e0f921 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -36,9 +36,36 @@ jobs: VITE_API_URL: https://api.turbotrades.dev VITE_WS_URL: https://ws.turbotrades.dev - - name: Success + - name: Deploy to Server run: | - echo "✅ Build complete!" - echo "📦 Backend dependencies installed" - echo "🎨 Frontend built: frontend/dist/" - echo "🚀 Ready for manual deployment" + # Hardcoded credentials (replace these values) + SERVER_HOST="your.server.host" + SERVER_USER="root" + SERVER_PASSWORD="your_password" + SERVER_PORT="22" + + echo "🚀 Deploying to server..." + + # Install sshpass + sudo apt-get update && sudo apt-get install -y sshpass rsync + + # Sync backend files + echo "📦 Syncing backend..." + sshpass -p "$SERVER_PASSWORD" rsync -avz --delete \ + --exclude 'node_modules' \ + --exclude '.git' \ + --exclude 'frontend/node_modules' \ + --exclude 'frontend/dist' \ + -e "ssh -o StrictHostKeyChecking=no -p $SERVER_PORT" \ + ./ ${SERVER_USER}@${SERVER_HOST}:/root/ttbackend/ + + # Sync frontend build + echo "🎨 Syncing frontend..." + sshpass -p "$SERVER_PASSWORD" rsync -avz --delete \ + -e "ssh -o StrictHostKeyChecking=no -p $SERVER_PORT" \ + ./frontend/dist/ ${SERVER_USER}@${SERVER_HOST}:/var/www/html/turbotrades/ + + echo "✅ Deployment complete!" + echo "🌐 Frontend: https://turbotrades.dev" + echo "🔧 Backend: https://api.turbotrades.dev" + echo "💬 PM2 will auto-reload with --watch"