ci: add production smoke test workflow (manual + daily cron)

- New workflow `production Smoke` with workflow_dispatch + daily schedule
  (05:00 UTC). Does NOT run on push/PR.
- Runs smoke-http, guest-onboarding, home-shell, and unauthenticated
  store tests against music-room.huiwings.cn.
- Includes optional SSH health check (if PROD_SSH_* secrets configured).
- Also makes smoke-http testOrgId configurable via PROD_ORG_ID env var
  for cross-environment use (moicen vs huiwings).
- Adds production-remote-check.sh script.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-01 15:38:15 +08:00
parent dd8d41c7b0
commit cfe60ebbb1
3 changed files with 133 additions and 1 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
# 正式服只读健康检查
# 由 GitHub Actionsplaywright-production.yml)通过 SSH 调用
set -euo pipefail
echo "=== htykc ==="
if ps aux | grep -q '[h]tykc'; then
echo "htykc: RUNNING"
ps aux | grep '[h]tykc' | awk '{print $2, $8, $11}'
else
echo "htykc: NOT RUNNING"
exit 1
fi
echo ""
echo "=== htyproc ==="
if ps aux | grep -q '[h]typroc'; then
echo "htyproc: RUNNING"
else
echo "htyproc: NOT RUNNING (optional)"
fi
echo ""
echo "=== nginx ==="
nginx -t 2>&1 || sudo nginx -t 2>&1
echo ""
echo "=== disk ==="
df -h / | tail -1
echo ""
echo "=== load ==="
uptime
echo ""
echo "=== memory ==="
free -h | grep -v Swap
echo ""
echo "=== ALL CHECKS PASSED ==="