-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (53 loc) · 1.52 KB
/
deploy.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
name: Deploy to Clever Cloud
on:
workflow_call:
inputs:
app:
type: string
required: true
description: The app name registered on Clever Cloud
alias:
type: string
required: true
description: The app alias registered on Clever Cloud
branch:
type: string
required: true
description: The branch to deploy
environment:
type: string
required: false
description: The environment to deploy
secrets:
CLEVER_SECRET:
required: true
description: The Clever Cloud secret
CLEVER_TOKEN:
required: true
description: The Clever Cloud token
CLEVER_ORG:
required: true
description: The Clever Cloud organization ID
jobs:
deploy:
if: ${{ github.ref_name == inputs.branch }}
environment:
name: ${{ inputs.environment }}
url: ${{ vars.HOST }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
fetch-depth: 0
- name: Install clever-tools
run: npm install -g clever-tools
- name: Deploy
env:
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
ORGA_ID: ${{ secrets.CLEVER_ORG }}
run: |
clever link --org $ORGA_ID --alias ${{ inputs.alias }} '${{ inputs.app }}'
clever deploy --alias ${{ inputs.alias }} --same-commit-policy rebuild