-
Notifications
You must be signed in to change notification settings - Fork 66
47 lines (38 loc) · 1.32 KB
/
nancal.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
name: nancal site deploy
on:
workflow_dispatch
# pull_request:
# branches: [ "main" ]
# push:
# branches: [ "main" ]
jobs:
build-and-deploy:
runs-on: nancal
defaults:
run:
working-directory: /home/nancal/rd/project/deeptest
steps:
- name: checkout backend codes
run: git pull
- name: checkout frontend codes
run: git pull
working-directory: /home/nancal/rd/project/deeptest-ui
- name: make server
run: ENV=dp make compile_server_linux
- name: make agent
run: ENV=dp make compile_agent_linux
- name: make ui
run: make compile_ui_nancal
- name: copy files
run: |
mkdir -p /home/nancal/rd/server
cp -f bin/linux/deeptest-server /home/nancal/rd/server/
cp -f client/bin/linux/deeptest-agent /home/nancal/rd/server/
rm -rf /home/nancal/rd/server/deeptest-ui
cp -fr client/ui /home/nancal/rd/server/deeptest-ui
- name: start service
run: |
ps -ef | grep 'deeptest-' | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
cd /home/nancal/rd/server
RUNNER_TRACKING_ID="" && nohup ./deeptest-server > server.log 2>&1 &
RUNNER_TRACKING_ID="" && nohup ./deeptest-agent > agent.log 2>&1 &