Skip to content

Commit a8cbb4c

Browse files
authored
Create main.yml
1 parent 01d625d commit a8cbb4c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/main.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Trigger Deployment Hook
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Change this to your main branch name
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
# Your build and deployment steps go here
17+
18+
- name: Find latest deployment
19+
id: latest_deployment
20+
run: |
21+
latest_deployment=$(curl -sSf -X GET "https://api.vercel.com/v12/now/deployments?projectId=ut-bot-deploy&limit=1" \
22+
-H "Authorization: Bearer 4EMYs0YWWJQrhQYIVDGzIFkR" \
23+
-H "Content-Type: application/json" \
24+
| jq -r '.deployments[0].uid')
25+
echo "::set-output name=deployment_id::$latest_deployment"
26+
27+
- name: Wait for Deployment
28+
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
34+
sleep 30
35+
done
36+
37+
- name: Install ChromaDB
38+
run: |
39+
pip install chromadb

0 commit comments

Comments
 (0)