-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.03 KB
/
deploy.yaml
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
name: Deploy Application
on:
push:
branches:
- main # or any branch you want to deploy from
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to remove server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd workplace/Questionnaire
git pull origin main
npm install
cd ws-events
npm install
npm run build
npm link
cd ..
cd frontend
npm link @ruchir28/ws-events
cd ../backend
npm link @ruchir28/ws-events
cd ..
export REACT_APP_BACKEND_URL=${{ secrets.REACT_APP_BACKEND_URL }}
export REACT_APP_WS_URL=${{ secrets.REACT_APP_WS_URL }}
npm run build:frontend
npm run build:backend
sudo mv frontend/build/* /var/www/Questionnaire/
cd backend
pm2 reload dist/index.js