#!/bin/bash # Quick Frontend Deploy Script with Basic Testing # Fast deployment with essential health check echo "🚀 Quick deploying frontend..." # Build, copy, restart in one go cd /home/alex/git/tilbudgivern/frontend && npm run build > /dev/null 2>&1 && \ cd /home/alex/git/tilbudgivern && cp -r frontend/build/* build/ && \ pm2 restart tilbudgivern-unified > /dev/null 2>&1 if [ $? -eq 0 ]; then echo "✅ Frontend deployed successfully!" # Quick health check sleep 3 SERVER_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4030) if [ "$SERVER_RESPONSE" = "200" ]; then echo "✅ Health check passed" echo "🌐 http://localhost:4030" else echo "⚠️ Health check failed (HTTP $SERVER_RESPONSE)" fi else echo "❌ Deployment failed" exit 1 fi