Skip to content

Commit 4e1fabd

Browse files
authored
Update main.yml
1 parent fc136da commit 4e1fabd

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/main.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,17 @@ jobs:
1818
- name: Find latest deployment
1919
id: latest_deployment
2020
run: |
21-
latest_deployment=$(curl -sSf -X GET "https://api.vercel.com/v12/now/deployments?projectId=ut-bot-deploy&limit=1" \
21+
latest_deployment_url=$(curl -sSf -X GET "https://api.vercel.com/v12/now/deployments?projectId=ut-bot-deploy&limit=1" \
2222
-H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
2323
-H "Content-Type: application/json" \
24-
| jq -r '.deployments[0].uid')
25-
echo "::set-output name=deployment_id::$latest_deployment"
24+
| jq -r '.deployments[0].url')
25+
echo "::set-output name=deployment_url::$latest_deployment_url"
2626
2727
- name: Wait for Deployment
2828
run: |
29-
# Command to check the deployment status
30-
while [[ "$(curl -sSf -X GET "https://api.vercel.com/v3/deployments/${{ steps.latest_deployment.outputs.deployment_id }}/events" \
31-
-H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
32-
-H "Content-Type: application/json" \
33-
| grep -c 'READY')" -eq 0 ]]; do
29+
deployment_url="${{ steps.latest_deployment.outputs.deployment_url }}"
30+
# Command to wait for the deployment to be ready
31+
while ! curl -sSLf "${deployment_url}" >/dev/null; do
3432
sleep 30
3533
done
3634

0 commit comments

Comments
 (0)