diff --git a/.github/workflows/deploy_check.yml b/.github/workflows/deploy_check.yml index 99d2375..b1b16e7 100755 --- a/.github/workflows/deploy_check.yml +++ b/.github/workflows/deploy_check.yml @@ -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