-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.01 KB
/
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
name: Deployment
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
# job의 이름 설정
deploy:
# 해당 job을 실행하는 운영 체제
runs-on: ubuntu-latest
# 수행할 동작 정의
steps:
# 1. 저장소 체크아웃
- name: Checkout source code
uses: actions/checkout@main
# 2. node.js 환경설정
- name: Set up Node.js
uses: actions/setup-node@main
with:
node-version: 14.x
# 3. 패키지 설치
- name: Install dependencies
run: npm install
# 4. 테스트
- name: Test unit
run: npm run test:unit
# 5. 빌드
- name: Build Page
run: npm run build
env:
NODE_ENV: production
# 6. gh-pages로 배포
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist