-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 1010 Bytes
/
Copy pathdeploy.yml
File metadata and controls
34 lines (28 loc) · 1010 Bytes
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
name: Deploy to VPS (staging)
on:
push:
branches:
- staging
paths:
- 'worldboss-app/**'
concurrency:
group: deploy-staging
cancel-in-progress: true
jobs:
deploy:
name: Déploiement WorldBoss — staging
runs-on: ubuntu-latest
steps:
- name: Trigger update via vps-monitor
run: |
curl -sf -c cookies.txt \
-X POST "${{ secrets.VPS_MONITOR_URL }}/auth/login" \
-H "Content-Type: application/json" \
-d '{"username":"${{ secrets.VPS_MONITOR_USER }}","password":"${{ secrets.VPS_MONITOR_PASS }}"}' \
| grep -q '"ok":true' || { echo "Échec login vps-monitor"; exit 1; }
curl -sf -b cookies.txt \
-X POST "${{ secrets.VPS_MONITOR_URL }}/api/deploy/update" \
-H "Content-Type: application/json" \
-d '{"name":"WorldBoss"}' \
| grep -q '"ok":true' || { echo "Échec update vps-monitor"; exit 1; }
echo "Déploiement déclenché !"