-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.16 KB
/
prod.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: sarabwayu
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # 원하는 Node.js 버전을 지정하세요
- name: Install Dependencies
run: npm install
- name: Build Project
run: npm run build
- name: Deploy to Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.NCP_HOST }}
username: ${{ secrets.NCP_USER }}
password: ${{ secrets.NCP_PASSWORD }}
source: "./build/*"
target: "/sarabwayu"
- name: Restart Web Server (Optional)
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.NCP_HOST }}
username: ${{ secrets.NCP_USER }}
password: ${{ secrets.NCP_PASSWORD }}
script: |
sudo systemctl restart nginx