-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.25 KB
/
github_deploy.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
name: FER App Deploy
on:
push:
branches:
- main
paths:
- svelte_client/**
- server.py
- requirements.txt
- predict.py
- .github/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Configure NodeJS
uses: actions/setup-node@v3
with:
node-version: '21.x'
- name: Check Front-end build
run: |
cd svelte_client
npm install
npm run build
- name: Deploy using SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
PORT: ${{ secrets.PORT }}
key: ${{ secrets.SSHKEY }}
script: |
cd Facial-Emotion-Recognition
git pull origin main
# Install Python dependencies
conda activate fer_env
python -m pip install -r requirements.txt
# Build front-end
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd svelte_client
npm install
npm run build
# restart web server
sudo /bin/systemctl restart fer_app.socket nginx