-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 912 Bytes
/
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
name: "Deploy to 404 Server"
on:
push:
branches:
- master
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd ${{ secrets.DIR }}
git pull
cd frontend
npm install
npm run build
cd ../backend
docker compose up -d
npm install
npm run build
screen -S 404 -X quit
screen -S 404 -d -L ../../last_log.txt -m npm start
echo "Deployed!"