-
-
Notifications
You must be signed in to change notification settings - Fork 269
54 lines (47 loc) · 1.77 KB
/
deploy.yml
File metadata and controls
54 lines (47 loc) · 1.77 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
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Deploy to Clever Cloud
on:
push:
paths:
- "carbonserver/**"
- "webapp/**"
- "pyproject.toml"
branches: [master]
permissions:
contents: read
jobs:
production:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Same as git fetch --unshallow
clean: true # Remove any untracked files or modifications
- name: Install Clever Tools CLI
run: |
CC_VERSION=latest
curl -s -O https://clever-tools.clever-cloud.com/releases/${CC_VERSION}/clever-tools-${CC_VERSION}_linux.tar.gz
tar -xvf clever-tools-${CC_VERSION}_linux.tar.gz
PATH=${PATH}:$(pwd)/clever-tools-${CC_VERSION}_linux
- name: Login to Clever Cloud
env:
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
run: ./clever-tools-latest_linux/clever login --token ${{ secrets.CLEVER_TOKEN }} --secret ${{ secrets.CLEVER_SECRET }}
- name: Deploy backend to Clever Cloud (PROD)
env:
CLEVER_APP_ID: ${{ secrets.BE_CLEVER_APP_ID_PROD }}
APP_NAME: cc_api_prod
run: |
./clever-tools-latest_linux/clever link $CLEVER_APP_ID
./clever-tools-latest_linux/clever deploy -f
- name: Deploy frontend to Clever Cloud (PROD)
env:
CLEVER_APP_ID: ${{ secrets.FE_CLEVER_APP_ID_PROD }}
APP_NAME: cc_dashboard_prod
run: |
echo $CLEVER_APP_ID
echo $APP_NAME
./clever-tools-latest_linux/clever link $CLEVER_APP_ID
# As the clever tools CLI aliasing is escaping _ character, a temporary hard-coded value is needed
# waiting for a fix from Clever
./clever-tools-latest_linux/clever deploy -f -a ccdashboardprod --quiet