-
Notifications
You must be signed in to change notification settings - Fork 10
70 lines (61 loc) · 2.31 KB
/
deploiement.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Déploiement
run-name: Déploiement du commit "${{ github.event.head_commit.message }}"
permissions: {}
on:
push:
branches: [master]
workflow_dispatch: # Pour activer le déclenchement manuel
jobs:
deploiement-demo:
name: Déploiement en DÉMO
environment: DEMO
runs-on: ubuntu-latest
steps:
- name: Cloner le dépôt Git
uses: actions/checkout@v4
with:
fetch-depth: 0 # Cloner l'intégralité du dépôt, pour ne pas avoir de « shallow repo » rejeté par Clever
- name: Installer la CLI Clever Cloud
shell: bash
run: npm install -g clever-tools
- name: Déployer en DÉMO
env:
CLEVER_SECRET: ${{ secrets.CLEVER_CLOUD_SECRET }}
CLEVER_TOKEN: ${{ secrets.CLEVER_CLOUD_TOKEN }}
ID_APP: ${{ secrets.CLEVER_CLOUD_ID_APP }}
ID_ORGANISATION: ${{ secrets.CLEVER_CLOUD_ID_ORGANISATION }}
run: |
clever link -o="$ID_ORGANISATION" "$ID_APP"
clever deploy --force --same-commit-policy=rebuild
- name: Invalider le cache Baleen
env:
BALEEN_TOKEN: ${{ secrets.BALEEN_TOKEN }}
BALEEN_NAMESPACE: ${{ secrets.BALEEN_NAMESPACE }}
run: bash scripts/baleen/invalidation-cache.sh
deploiement-prod:
needs: [deploiement-demo]
name: Déploiement en PROD
environment: PROD
runs-on: ubuntu-latest
steps:
- name: Cloner le dépôt Git
uses: actions/checkout@v4
with:
fetch-depth: 0 # Cloner l'intégralité du dépôt, pour ne pas avoir de « shallow repo » rejeté par Clever
- name: Installer la CLI Clever Cloud
shell: bash
run: npm install -g clever-tools
- name: Déployer en PROD
env:
CLEVER_SECRET: ${{ secrets.CLEVER_CLOUD_SECRET }}
CLEVER_TOKEN: ${{ secrets.CLEVER_CLOUD_TOKEN }}
ID_APP: ${{ secrets.CLEVER_CLOUD_ID_APP }}
ID_ORGANISATION: ${{ secrets.CLEVER_CLOUD_ID_ORGANISATION }}
run: |
clever link -o="$ID_ORGANISATION" "$ID_APP"
clever deploy --force --same-commit-policy=rebuild
- name: Invalider le cache Baleen
env:
BALEEN_TOKEN: ${{ secrets.BALEEN_TOKEN }}
BALEEN_NAMESPACE: ${{ secrets.BALEEN_NAMESPACE }}
run: bash scripts/baleen/invalidation-cache.sh