fix(ci): use SSH-based smoke test for reliable DNS resolution
CI/CD / deploy (push) Successful in 1m27s Details

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-04-01 14:13:14 -07:00
parent ce5d59f45c
commit c0197a36cf
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://rmaps.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://rmaps.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/websites/rmaps-online/.rollback-tag 2>/dev/null")