File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,25 @@ jobs:
18
18
- name : Find latest deployment
19
19
id : latest_deployment
20
20
run : |
21
- latest_deployment_url =$(curl -sSf -X GET "https://api.vercel.com/v6/now /deployments?projectId=ut-bot-deploy&limit=1" \
21
+ latest_deployment_id =$(curl -sSf -X GET "https://api.vercel.com/v6/deployments?projectId=ut-bot-deploy&limit=1" \
22
22
-H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
23
23
-H "Content-Type: application/json" \
24
- | jq -r '.deployments[0].url')
24
+ | jq -r '.deployments[0].uid')
25
+ echo "::set-output name=deployment_id::$latest_deployment_id"
26
+ latest_deployment_url=$(curl -sSf -X GET "https://api.vercel.com/v6/deployments/${latest_deployment_id}" \
27
+ -H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
28
+ -H "Content-Type: application/json" \
29
+ | jq -r '.url')
25
30
echo "::set-output name=deployment_url::$latest_deployment_url"
26
31
27
32
- name : Wait for Deployment
28
33
run : |
29
- deployment_url ="${{ steps.latest_deployment.outputs.deployment_url }}"
34
+ deployment_id ="${{ steps.latest_deployment.outputs.deployment_id }}"
30
35
# Command to wait for the deployment to be ready
31
- while ! curl -sSLf "${deployment_url}" >/dev/null; do
36
+ while [[ "$(curl -sSf -X GET "https://api.vercel.com/v6/deployments/${deployment_id}" \
37
+ -H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
38
+ -H "Content-Type: application/json" \
39
+ | jq -r '.ready')" != "true" ]]; do
32
40
sleep 30
33
41
done
34
42
You can’t perform that action at this time.
0 commit comments