Add GitHub Actions deployment workflow
- Add deployment workflow with test, build, and deploy jobs - Add testing workflow for PRs - Add deployment scripts (deploy, healthcheck, rollback) - Add systemd service configuration - Update Makefile with CI/CD targets - Add comprehensive deployment documentation
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
HEALTH_URL="${HEALTH_URL:-http://localhost:1999/health}"
|
||||
MAX_RETRIES=30
|
||||
RETRY_DELAY=2
|
||||
|
||||
echo "🏥 Running health check on $HEALTH_URL"
|
||||
|
||||
for i in $(seq 1 $MAX_RETRIES); do
|
||||
if curl -sf "$HEALTH_URL" > /dev/null 2>&1; then
|
||||
echo "✅ Health check passed (attempt $i/$MAX_RETRIES)"
|
||||
|
||||
# Show health response
|
||||
RESPONSE=$(curl -s "$HEALTH_URL")
|
||||
echo ""
|
||||
echo "📊 Health Status:"
|
||||
echo "$RESPONSE" | jq . 2>/dev/null || echo "$RESPONSE"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "⏳ Waiting for service... (attempt $i/$MAX_RETRIES)"
|
||||
sleep $RETRY_DELAY
|
||||
done
|
||||
|
||||
echo "❌ Health check failed after $MAX_RETRIES attempts"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user