fix(ci): use SSH-based smoke test for reliable DNS resolution
CI/CD / deploy (push) Failing after 1m19s
Details
CI/CD / deploy (push) Failing after 1m19s
Details
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9bffa08215
commit
e09d791a55
|
|
@ -52,7 +52,8 @@ jobs:
|
|||
- name: Smoke test
|
||||
run: |
|
||||
sleep 15
|
||||
HTTP_CODE=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 30 https://conviction.jeffemmett.com/ 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://conviction.jeffemmett.com/ 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/conviction-voting-demo/.rollback-tag 2>/dev/null")
|
||||
|
|
|
|||
Loading…
Reference in New Issue