63 lines (58 loc) · 1.98 KB
/
deployment_stg.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
---
on:
push:
branches:
- develop
name: Deployment (stg)
jobs:
deploy:
name: Deployment (stg)
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: itk-dev/actions-remote-ssh@master
with:
command: |
cd ${{ secrets.APP_PATH_STG }} &&
chmod 755 html/sites/default &&
git clean -d --force &&
git checkout develop &&
git fetch &&
git reset origin/develop --hard
host: ${{ secrets.HOST_STG }}
key: ${{ secrets.PRIVATE_KEY }}
cert: ${{ secrets.PUBLIC_KEY_CERT }}
- name: Composer install
uses: itk-dev/actions-remote-ssh@master
with:
command: |
cd ${{ secrets.APP_PATH_STG }} &&
chmod 755 html/sites/default &&
composer1 install --no-dev
host: ${{ secrets.HOST_STG }}
key: ${{ secrets.PRIVATE_KEY }}
cert: ${{ secrets.PUBLIC_KEY_CERT }}
- name: Drush config import
uses: itk-dev/actions-remote-ssh@master
with:
command: |
cd ${{ secrets.APP_PATH_STG }} &&
chmod 755 html/sites/default &&
vendor/bin/drush cr --cache-clear &&
vendor/bin/drush updb -y &&
vendor/bin/drush config-import -y &&
vendor/bin/drush cr --cache-clear
host: ${{ secrets.HOST_STG }}
key: ${{ secrets.PRIVATE_KEY }}
cert: ${{ secrets.PUBLIC_KEY_CERT }}
- name: Drush locale import
uses: itk-dev/actions-remote-ssh@master
with:
command: |
cd ${{ secrets.APP_PATH_STG }} &&
chmod 755 html/sites/default &&
vendor/bin/drush locale:import --type=customized --override=all da ../translations/custom-translations.da.po &&
vendor/bin/drush cr --cache-clear
host: ${{ secrets.HOST_STG }}
key: ${{ secrets.PRIVATE_KEY }}
cert: ${{ secrets.PUBLIC_KEY_CERT }}