-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 1.46 KB
/
Copy pathdeploy.yml
File metadata and controls
41 lines (37 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deploy
# SG (+ NG) deploys via Coolify's own git webhook (auto-deploy on push), so it
# is intentionally NOT triggered here — that avoided a duplicate build per push.
# GH and MY have no webhook, so they still deploy through the Coolify API below.
on:
push:
branches:
- main
jobs:
deploy-gh:
name: Redeploy Ghana (GH)
runs-on: ubuntu-latest
steps:
- name: Trigger Ghana Coolify redeploy
run: |
STATUS=$(curl -s -o /dev/null -w "%{http_code}" --max-time 30 \
-H "Authorization: Bearer ${{ secrets.COOLIFY_GH_TOKEN }}" \
"http://2.24.131.228:8000/api/v1/deploy?uuid=za31ou1eopl0bbqpybxd1ds8&force=false")
echo "Coolify GH response: $STATUS"
if [ "$STATUS" != "200" ] && [ "$STATUS" != "201" ]; then
echo "GH deploy trigger failed with HTTP $STATUS"
exit 1
fi
deploy-my:
name: Redeploy Malaysia (MY)
runs-on: ubuntu-latest
steps:
- name: Trigger Malaysia Coolify redeploy
run: |
STATUS=$(curl -s -o /dev/null -w "%{http_code}" --max-time 30 \
-H "Authorization: Bearer ${{ secrets.COOLIFY_MY_TOKEN }}" \
"http://76.13.215.51:8000/api/v1/deploy?uuid=bil306n1kw66911i3shtzq56&force=false")
echo "Coolify MY response: $STATUS"
if [ "$STATUS" != "200" ] && [ "$STATUS" != "201" ]; then
echo "MY deploy trigger failed with HTTP $STATUS"
exit 1
fi