Verify deployments on Hostinger VPS srv759970 after code changes. Checks HTTP status, PM2 processes, takes screenshots, and generates deployment reports.
Verifies deployments on Hostinger VPS by checking PM2 processes, HTTP status, SSL certificates, and capturing screenshots.
/plugin marketplace add theflysurfer/claude-skills-marketplace/plugin install theflysurfer-claude-skills-marketplace@theflysurfer/claude-skills-marketplaceThis skill is limited to using the following tools:
Automate post-deployment verification for INCLUZ'HACT sites on Hostinger VPS.
Invoke automatically after:
git pull + npm run build + pm2 restart completed# 1. Check PM2 processes
ssh automation@69.62.108.82 'pm2 list'
# 2. Verify HTTP status
curl -I https://incluzhact.fr
curl -I https://preview.incluzhact.fr
# 3. Check PM2 logs for errors
ssh automation@69.62.108.82 'pm2 logs incluzhact --lines 50 --nostream'
ssh automation@69.62.108.82 'pm2 logs incluzhact-preview --lines 50 --nostream'
# 4. Take screenshots (Playwright)
# (Handled by Playwright MCP tools)
# 5. Generate report
# (Handled by Write tool)
ssh automation@69.62.108.82 << 'EOF'
echo "=== PM2 Process Status ==="
pm2 list | grep -E "(incluzhact|jokers-hockey)"
echo ""
echo "=== Detailed Status ==="
pm2 describe incluzhact | grep -E "(status|uptime|restarts|memory)"
pm2 describe incluzhact-preview | grep -E "(status|uptime|restarts|memory)"
EOF
Expected Output:
┌────┬───────────────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┐
│ id │ name │ mode │ pid │ uptime │ ↺ │ status │ cpu │
├────┼───────────────────────┼─────────┼─────────┼──────────┼────────┼────────┼──────────┤
│ 2 │ incluzhact │ cluster │ 123456 │ 5m │ 0 │ online │ 0% │
│ 4 │ incluzhact-preview │ fork │ 789012 │ 5m │ 0 │ online │ 0% │
└────┴───────────────────────┴─────────┴─────────┴──────────┴────────┴────────┴──────────┘
Red Flags:
errored, stopped, stopping0s (constantly restarting)ssh automation@69.62.108.82 << 'EOF'
echo "=== Recent PM2 Events ==="
pm2 logs incluzhact --lines 20 --nostream | grep -i "error\|fatal\|crash" || echo "✅ No errors"
pm2 logs incluzhact-preview --lines 20 --nostream | grep -i "error\|fatal\|crash" || echo "✅ No errors"
EOF
# Production
echo "=== Production (incluzhact.fr) ==="
curl -I https://incluzhact.fr 2>&1 | head -15
echo ""
# Preview
echo "=== Preview (preview.incluzhact.fr) ==="
curl -I https://preview.incluzhact.fr 2>&1 | head -15
Expected Headers:
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html; charset=UTF-8
X-Powered-By: Express
Strict-Transport-Security: max-age=31536000
Red Flags:
echo "=== SSL Certificate Check ==="
echo | openssl s_client -servername incluzhact.fr -connect incluzhact.fr:443 2>/dev/null | openssl x509 -noout -dates
echo ""
echo | openssl s_client -servername preview.incluzhact.fr -connect preview.incluzhact.fr:443 2>/dev/null | openssl x509 -noout -dates
Expected:
notBefore=Dec 1 00:00:00 2024 GMT
notAfter=Mar 1 23:59:59 2025 GMT
Red Flag: notAfter date is < 30 days away
// Production - Coming Soon page
await page.goto('https://incluzhact.fr');
await page.screenshot({ path: 'production-home.png' });
// Preview - Full site
const pages = [
'/',
'/a-propos',
'/services',
'/projets',
'/contact'
];
for (const path of pages) {
await page.goto(`https://preview.incluzhact.fr${path}`);
await page.screenshot({ path: `preview-${path.replace('/', 'home')}.png` });
}
Manual inspection for:
# Check if contact form endpoint exists
curl -X POST https://preview.incluzhact.fr/api/contact \
-H "Content-Type: application/json" \
-d '{}' \
2>&1 | head -10
# Expected: 400 Bad Request (validation error) - means endpoint works
# Red Flag: 404 Not Found - means route broken
// Use Playwright to verify all routes load
const routes = ['/', '/a-propos', '/services', '/projets', '/contact'];
for (const route of routes) {
const response = await page.goto(`https://preview.incluzhact.fr${route}`);
console.log(`${route}: ${response.status()}`);
// Expected: 200 for all routes
}
# Run full verification and save report
{
echo "# Deployment Verification Report"
echo "Date: $(date)"
echo ""
echo "## PM2 Status"
ssh automation@69.62.108.82 'pm2 list | grep incluzhact'
echo ""
echo "## HTTP Status"
echo "Production: $(curl -s -o /dev/null -w '%{http_code}' https://incluzhact.fr)"
echo "Preview: $(curl -s -o /dev/null -w '%{http_code}' https://preview.incluzhact.fr)"
echo ""
echo "## Recent Logs"
ssh automation@69.62.108.82 'pm2 logs incluzhact --lines 10 --nostream'
} > deployment-report-$(date +%Y%m%d-%H%M%S).md
#!/bin/bash
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🔍 Deployment Verification Starting..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# 1. PM2 Check
echo "📦 Step 1/5: Checking PM2 processes..."
ssh automation@69.62.108.82 << 'EOF'
pm2 list | grep -E "incluzhact" | grep "online" > /dev/null
if [ $? -eq 0 ]; then
echo "✅ PM2 processes online"
else
echo "❌ PM2 processes not running!"
pm2 list
exit 1
fi
EOF
echo ""
# 2. HTTP Check
echo "🌐 Step 2/5: Checking HTTP status..."
PROD_STATUS=$(curl -s -o /dev/null -w '%{http_code}' https://incluzhact.fr)
PREVIEW_STATUS=$(curl -s -o /dev/null -w '%{http_code}' https://preview.incluzhact.fr)
if [ "$PROD_STATUS" = "200" ]; then
echo "✅ Production: HTTP $PROD_STATUS"
else
echo "❌ Production: HTTP $PROD_STATUS"
fi
if [ "$PREVIEW_STATUS" = "200" ]; then
echo "✅ Preview: HTTP $PREVIEW_STATUS"
else
echo "❌ Preview: HTTP $PREVIEW_STATUS"
fi
echo ""
# 3. Error Check
echo "📝 Step 3/5: Checking for errors in logs..."
ssh automation@69.62.108.82 << 'EOF'
ERRORS=$(pm2 logs incluzhact --lines 50 --nostream | grep -i "error\|fatal\|crash" | wc -l)
if [ "$ERRORS" -eq 0 ]; then
echo "✅ No errors in production logs"
else
echo "⚠️ Found $ERRORS errors in production logs"
fi
ERRORS=$(pm2 logs incluzhact-preview --lines 50 --nostream | grep -i "error\|fatal\|crash" | wc -l)
if [ "$ERRORS" -eq 0 ]; then
echo "✅ No errors in preview logs"
else
echo "⚠️ Found $ERRORS errors in preview logs"
fi
EOF
echo ""
# 4. SSL Check
echo "🔒 Step 4/5: Checking SSL certificates..."
PROD_SSL=$(echo | openssl s_client -servername incluzhact.fr -connect incluzhact.fr:443 2>/dev/null | openssl x509 -noout -enddate)
PREVIEW_SSL=$(echo | openssl s_client -servername preview.incluzhact.fr -connect preview.incluzhact.fr:443 2>/dev/null | openssl x509 -noout -enddate)
echo "✅ Production SSL: $PROD_SSL"
echo "✅ Preview SSL: $PREVIEW_SSL"
echo ""
# 5. Screenshot (handled by Playwright in skill invocation)
echo "📸 Step 5/5: Taking screenshots (manual)..."
echo "✅ Use Playwright tools to capture visual state"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "✅ Deployment verification complete!"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# PM2 + HTTP only
ssh automation@69.62.108.82 'pm2 list | grep incluzhact' && \
curl -I https://incluzhact.fr && \
curl -I https://preview.incluzhact.fr
# PM2 + HTTP + Logs
bash deployment-verifier-script.sh
# PM2 + HTTP + Logs + Screenshots + Report
bash deployment-verifier-script.sh
# Then use Playwright for screenshots
# Then generate report
# View error logs
ssh automation@69.62.108.82 'pm2 logs incluzhact --err --lines 100'
# Restart
ssh automation@69.62.108.82 'pm2 restart incluzhact'
# If still failing, rebuild
ssh automation@69.62.108.82 << 'EOF'
cd /var/www/incluzhact
npm run build
pm2 restart incluzhact
EOF
Cause: PM2 app not responding, Nginx can't proxy
Solution:
# Check if PM2 listening on correct port
ssh automation@69.62.108.82 'ss -tuln | grep -E "5173|5174"'
# Restart PM2
ssh automation@69.62.108.82 'pm2 restart incluzhact incluzhact-preview'
# Check Nginx config
ssh automation@69.62.108.82 'sudo nginx -t && sudo systemctl restart nginx'
Cause: Route doesn't exist or build failed
Solution:
# Check if build artifacts exist
ssh automation@69.62.108.82 'ls -lh /var/www/incluzhact/dist/public'
# Rebuild
ssh automation@69.62.108.82 'cd /var/www/incluzhact && npm run build && pm2 restart incluzhact'
Cause: Certificate expired or not found
Solution:
# Renew certificate
ssh automation@69.62.108.82 'sudo certbot renew --nginx'
# Force renew if needed
ssh automation@69.62.108.82 'sudo certbot renew --force-renewal --nginx'
Use this skill after deployment completes:
# 1. Deploy code
ssh automation@69.62.108.82 'cd /var/www/incluzhact && git pull && npm install && npm run build && pm2 restart incluzhact'
# 2. Wait for PM2 to stabilize
sleep 10
# 3. Run verification (this skill)
bash deployment-verifier-script.sh
# 4. Take screenshots
# (Use Playwright MCP tools)
# 5. Review report
cat deployment-report-*.md
Deployment is successful if ALL checks pass:
onlineautomation@69.62.108.82deployment-report-[YYYYMMDD-HHMMSS].md (saved locally)Recommandés:
Optionnels:
Bash (usage: SSH commands, pm2 list/logs, curl HTTP checks, openssl SSL verification)mcp__playwright__browser_navigate (usage: load deployed pages)mcp__playwright__browser_take_screenshot (usage: capture visual state of deployed UI)mcp__playwright__browser_snapshot (usage: get DOM state for debugging)mcp__playwright__browser_close (usage: cleanup browser after screenshots)Write (usage: generate deployment verification report markdown file)julien-infra-hostinger-deployment completes
├─► npm run build ✅
├─► pm2 reload incluzhact-preview ✅
└─► Wait 10s for stabilization
↓
julien-infra-deployment-verifier (THIS SKILL)
├─► Step 1: Check PM2 status
│ ├─► ssh pm2 list
│ ├─► Verify status: online
│ ├─► Check uptime: >10s
│ └─► Check restarts: <5
├─► Step 2: HTTP status check
│ ├─► curl -I https://incluzhact.fr
│ ├─► curl -I https://preview.incluzhact.fr
│ └─► Verify: HTTP 200
├─► Step 3: SSL certificate check
│ ├─► openssl s_client (production)
│ ├─► openssl s_client (preview)
│ └─► Verify: notAfter >30 days
├─► Step 4: Error log analysis
│ ├─► ssh pm2 logs --lines 50
│ ├─► grep -i "error|fatal|crash"
│ └─► Verify: 0 critical errors
├─► Step 5: Visual verification (Playwright)
│ ├─► Navigate to deployed URLs
│ ├─► Take screenshots
│ └─► Save: production-home.png, preview-*.png
└─► Step 6: Generate report
└─► Write deployment-report-[timestamp].md
↓
Verification Result:
├─► ✅ ALL CHECKS PASS → Deployment successful
├─► ⚠️ WARNINGS → Deployment OK but investigate
└─► ❌ FAILURES → Rollback recommended
↓
[If issues detected]
├─► julien-infra-nginx-audit (check Nginx security)
└─► Rollback procedure (from deployment skill)
Scenario: After deploying to preview, verify deployment succeeded and capture screenshots for client
Command:
# Automatically invoked by deployment skill, or manually:
# "Verify deployment on preview environment"
Result:
incluzhact-preview online, uptime 1m, 0 restarts ✅preview-home.pngpreview-a-propos.pngpreview-services.pngpreview-contact.pngdeployment-report-20251209-143022.md# Minimal check
ssh automation@69.62.108.82 'pm2 list' && curl -I https://incluzhact.fr
# Full verification
bash deployment-verifier-script.sh
# Check logs
ssh automation@69.62.108.82 'pm2 logs incluzhact --lines 50'
# Restart if needed
ssh automation@69.62.108.82 'pm2 restart incluzhact incluzhact-preview'
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.