File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,19 @@ jobs:
15
15
16
16
# Your build and deployment steps go here
17
17
18
+ - name : Find project ID
19
+ id : project_id
20
+ run : |
21
+ project_id=$(curl -sSf -X GET "https://api.vercel.com/v8/projects" \
22
+ -H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
23
+ -H "Content-Type: application/json" \
24
+ | jq -r '.[] | select(.name == "ut-bot-deploy") | .id')
25
+ echo "::set-output name=project_id::$project_id"
26
+
18
27
- name : Find latest deployment
19
28
id : latest_deployment
20
29
run : |
21
- latest_deployment=$(curl -sSf -X GET "https://api.vercel.com/v12/now/deployments?projectId=ut-bot-deploy &limit=1" \
30
+ latest_deployment=$(curl -sSf -X GET "https://api.vercel.com/v12/now/deployments?projectId=${{ steps.project_id.outputs.project_id }} &limit=1" \
22
31
-H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
23
32
-H "Content-Type: application/json" \
24
33
| jq -r '.deployments[0].uid')
27
36
- name : Wait for Deployment
28
37
run : |
29
38
# Command to check the deployment status
30
- while [[ "$(curl -sSf -X GET "https://api.vercel.com/v3/deployments/ut-bot-deploy /events" \
39
+ while [[ "$(curl -sSf -X GET "https://api.vercel.com/v3/deployments/${{ steps.latest_deployment.outputs.deployment_id }} /events" \
31
40
-H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
32
41
-H "Content-Type: application/json" \
33
42
| grep -c 'READY')" -eq 0 ]]; do
You can’t perform that action at this time.
0 commit comments