fix: Aumenta o número de tentativas e reduz os intervalos de espera para a verificação de status do deploy no workflow.

This commit is contained in:
Rodrigo Borba 2026-01-25 14:17:08 -03:00
parent 16b3703c0a
commit a7bf570815

View File

@ -20,11 +20,10 @@ jobs:
run: echo "https://chatwoot-pr-${{ github.event.pull_request.number }}.herokuapp.com"
- name: Check Deployment Status
run: |
max_attempts=10
max_attempts=15
attempt=1
status_code=0
echo "Waiting for review app to be deployed/redeployed, trying in 10 minutes..."
sleep 600
echo "Checking review app status..."
while [ $attempt -le $max_attempts ]; do
response=$(curl -s -o /dev/null -w "%{http_code}" https://chatwoot-pr-${{ github.event.pull_request.number }}.herokuapp.com/api)
status_code=$(echo $response | head -n 1)
@ -34,15 +33,15 @@ jobs:
echo "Deployment successful"
exit 0
else
echo "Deployment status unknown, retrying in 3 minutes..."
sleep 180
echo "Deployment status healthy but services not ready, retrying in 30 seconds..."
sleep 30
fi
else
echo "Waiting for review app to be ready, retrying in 3 minutes..."
sleep 180
echo "Waiting for review app to be ready, retrying in 30 seconds... (Attempt $attempt/$max_attempts)"
sleep 30
attempt=$((attempt + 1))
fi
done
echo "Deployment failed after $max_attempts attempts"
echo "Deployment check timed out after $max_attempts attempts"
exit 1
fi