-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.27 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
49
50
name: build and production deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache dependencis
id: node_modules_cache_id
uses: actions/cache@v2
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
- name: Install dependency
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm ci
- name: Cache build
id: gatsby_build_cache_id
uses: actions/cache@v2
with:
path: |
.cache
public
key: ${{ github.repository }}-${{ github.ref }}
- name: Build
run: npm run build
- name: Deploy to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
# - name: Deploy
# run: npx netlify-cli deploy -d public --prod -a ${{ secrets.NETLIFY_AUTH_TOKEN }} -s ${{ secrets.NETLIFY_SITE_ID }}