-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (43 loc) · 1.74 KB
/
branch-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
name: Branch Deploy
on: [push]
jobs:
branch-deploy:
runs-on: ubuntu-latest
environment: openfibre-cove-branch-deploy
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DOKKUSD_BRANCH_SSH_PRIVATE_KEY }}
name: id_rsa # optional
known_hosts: ${{ secrets.DOKKUSD_BRANCH_SSH_KEYSCAN }}
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.7
architecture: x64
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-
- run: pip install dokkusd
- uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}
prefix: ALLSECRETS_
- run: python -m dokkusd.cli deploy --appname ${{ secrets.DOKKUSD_BRANCH_APP_NAME_PREFIX }}-${GITHUB_REF##*/} --environmentvariablesprefixedby ALLSECRETS_DOKKUSD_BRANCH_ENVIRONMENT_VARIABLE_
env:
DOKKUSD_REMOTE_HOST: ${{ secrets.DOKKUSD_BRANCH_REMOTE_HOST }}
DOKKUSD_REMOTE_PORT: ${{ secrets.DOKKUSD_BRANCH_REMOTE_PORT }}
DOKKUSD_REMOTE_USER: ${{ secrets.DOKKUSD_BRANCH_REMOTE_USER }}
DOKKUSD_HTTP_AUTH_USER: ${{ secrets.DOKKUSD_BRANCH_HTTP_AUTH_USER }}
DOKKUSD_HTTP_AUTH_PASSWORD: ${{ secrets.DOKKUSD_BRANCH_HTTP_AUTH_PASSWORD }}
DOKKUSD_LETS_ENCRYPT: ${{ secrets.DOKKUSD_BRANCH_LETS_ENCRYPT }}
DOKKUSD_ENVIRONMENT_VARIABLES_JSON: ${{ secrets.DOKKUSD_BRANCH_ENVIRONMENT_VARIABLES_JSON }}
DOKKUSD_PS_SCALE: ${{ secrets.DOKKUSD_PS_SCALE }}