-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (43 loc) · 1.5 KB
/
cd-development.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
name: deploy to the development environment
on:
push:
branches: [development]
permissions:
contents: read # for checkout
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/[email protected]
with:
host: ${{ secrets.LUNA_CD_SSH_HOST }}
username: ${{ secrets.LUNA_CD_SSH_USERNAME }}
key: ${{ secrets.LUNA_CD_SSH_KEY }}
port: ${{ secrets.LUNA_CD_SSH_PORT }}
script_stop: true
script: |
mkdir -p /lunatic/repos;
cd /lunatic/repos;
if [ ! -d luna ]; then
git clone https://github.com/sisgha/luna -b development luna;
fi
chgrp -R 1000 luna;
chown -R 1000 luna;
git config --global --add safe.directory /lunatic/repos/luna;
cd /lunatic/repos/luna/luna-backend;
make dev-setup;
make dev-down;
cd /lunatic/repos/luna;
(git branch -D temp-fix 2>/dev/null; exit 0);
git checkout -b temp-fix;
git branch -D development;
git fetch origin;
git checkout -b development --track origin/development;
git pull origin development;
cd /lunatic/repos;
chgrp -R 1000 /lunatic/repos/luna;
chown -R 1000 /lunatic/repos/luna;
cd /lunatic/repos/luna/luna-backend;
make dev-start;