-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.06 KB
/
main.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
name: Remote SSH
on:
push:
branches:
- production
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.IP }}
username: ${{ secrets.USER }}
key: ${{ secrets.PRIVATE_KEY }}
port: ${{ secrets.PORT }}
script: |
cd programming/VPlan_FR/
kill -INT (lsof -t nohup.out) || true
git checkout production
git pull
source venv/bin/activate.fish
pip install --upgrade pip
pip install -r requirements.txt
cd client
npm install --force
npm run build
sudo service apache2 restart
cd ..
rm nohup.out || true
nohup venv/bin/python3 -m backend.load_plans --ignore-exceptions --never-raise-out-of-proxies -l DEBUG - i 300 > nohup.out 2> nohup.err < /dev/null &
disown (lsof -t nohup.out) || true