-
-
Notifications
You must be signed in to change notification settings - Fork 7
35 lines (34 loc) · 941 Bytes
/
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
name: build gatsby
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{runner.OS}}-build-${{hashFiles('**/yarn.lock')}}
restore-keys: |
${{ runner.OS }}-build-${{ runner.OS }}-
- name: Install dependencies
run: yarn install --prod --pure-lockfile
- name: Build
run: yarn build:ghpage
env:
NODE_ENV: production
- name: Create CNAME
run: echo "jedutools.jbnu.ac.kr" > ./docs/CNAME
- uses: peaceiris/actions-gh-pages@v2
env:
GITHUB_TOKEN: ${{ secrets.JHELPERTOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./docs