fix(ci): use SSH-based smoke test for reliable DNS resolution
CI/CD / deploy (push) Failing after 1m20s Details

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-04-01 14:12:52 -07:00
parent 752f203497
commit 18e2074b43
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ jobs:
- name: Smoke test
run: |
sleep 15
HTTP_CODE=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 30 https://demo.rtube.online/ 2>/dev/null || echo "000")
HTTP_CODE=$(ssh -o StrictHostKeyChecking=no -i ~/.ssh/deploy_key root@${{ secrets.DEPLOY_HOST }} \
"curl -sSL -o /dev/null -w '%{http_code}' --max-time 30 https://demo.rtube.online/ 2>/dev/null || echo 000")
if [ "$HTTP_CODE" -lt 200 ] || [ "$HTTP_CODE" -ge 400 ]; then
echo "Smoke test failed (HTTP $HTTP_CODE) — rolling back"
ROLLBACK_TAG=$(ssh -o StrictHostKeyChecking=no -i ~/.ssh/deploy_key root@${{ secrets.DEPLOY_HOST }} "cat /opt/apps/rtube-online/.rollback-tag 2>/dev/null")