Skip to content

Commit 888fd6f

Browse files
committed
nsj branch with deployment to dev
1 parent 475559f commit 888fd6f

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/deploy-nsj-dev.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: deploy-nsj-dev
2+
3+
on:
4+
push:
5+
branches: [nsj/master]
6+
7+
concurrency:
8+
group: environment-nsj-dev
9+
10+
jobs:
11+
deploy:
12+
name: "Deploy to srs-dev.skauting.cz"
13+
environment: srs-dev.skauting.cz
14+
runs-on: ubuntu-20.04
15+
container:
16+
image: skaut/lebeda:8.0
17+
env:
18+
CONFIG_DATABASE_HOST: ${{ secrets.CONFIG_DATABASE_HOST }}
19+
CONFIG_DATABASE_NAME: ${{ secrets.CONFIG_DATABASE_NAME }}
20+
CONFIG_DATABASE_PASSWORD: ${{ secrets.CONFIG_DATABASE_PASSWORD }}
21+
CONFIG_DATABASE_USER: ${{ secrets.CONFIG_DATABASE_USER }}
22+
CONFIG_MAIL_HOST:
23+
CONFIG_MAIL_PASSWORD:
24+
CONFIG_MAIL_PORT: 0
25+
CONFIG_MAIL_SECURE:
26+
CONFIG_MAIL_SMTP: false
27+
CONFIG_MAIL_USERNAME:
28+
CONFIG_SKAUTIS_APPLICATION_ID: ${{ secrets.CONFIG_SKAUTIS_APPLICATION_ID }}
29+
CONFIG_SKAUTIS_TEST_MODE: ${{ secrets.CONFIG_SKAUTIS_TEST_MODE }}
30+
CONFIG_RECAPTCHA_SITE_KEY: ${{ secrets.CONFIG_RECAPTCHA_SITE_KEY }}
31+
CONFIG_RECAPTCHA_SECRET_KEY: ${{ secrets.CONFIG_RECAPTCHA_SECRET_KEY }}
32+
DEPLOY_DIRECTORY: ${{ secrets.DEPLOY_DIRECTORY }}
33+
DEPLOY_SSH_HOST: ${{ secrets.DEPLOY_SSH_HOST }}
34+
DEPLOY_SSH_IP: ${{ secrets.DEPLOY_SSH_IP }}
35+
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
36+
DEPLOY_SSH_PORT: ${{ secrets.DEPLOY_SSH_PORT }}
37+
DEPLOY_SSH_USERNAME: ${{ secrets.DEPLOY_SSH_USERNAME }}
38+
steps:
39+
- uses: actions/checkout@v2
40+
# Copy & paste from https://github.com/actions/cache/blob/master/examples.md#php---composer
41+
- name: Get composer cache
42+
id: composer-cache
43+
run: |
44+
echo "::set-output name=dir::$(composer config cache-files-dir)"
45+
- uses: actions/cache@v1
46+
with:
47+
path: ${{ steps.composer-cache.outputs.dir }}
48+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
49+
restore-keys: |
50+
${{ runner.os }}-composer-
51+
- name: Install yarn
52+
run: |
53+
apt-get update
54+
apt-get install -y npm
55+
npm install --global yarn
56+
#Copy & paste from https://github.com/actions/cache/blob/master/examples.md#node---yarn
57+
- name: Get yarn cache
58+
id: yarn-cache-dir-path
59+
run: echo "::set-output name=dir::$(yarn cache dir)"
60+
- uses: actions/cache@v1
61+
id: yarn-cache
62+
with:
63+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
64+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
65+
restore-keys: |
66+
${{ runner.os }}-yarn-
67+
- name: Setup SSH key and deploy
68+
run: |
69+
mkdir -p /root/.ssh
70+
ssh-keyscan -H "${DEPLOY_SSH_HOST}","${DEPLOY_SSH_IP}" >> /root/.ssh/known_hosts
71+
eval `ssh-agent -s`
72+
echo "${DEPLOY_SSH_KEY}" | tr -d '\r' | ssh-add -
73+
phing deploy

0 commit comments

Comments
 (0)