-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.04 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Main
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: Install dependencies
run: npm ci --production
- name: Build the site
run: npm run build
- name: Subset fonts
run: npm run subset-fonts
- name: Upload build
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
deploy:
needs: build
runs-on: ubuntu-20.04
steps:
- name: Download build
uses: actions/download-artifact@v2
with:
name: dist
- name: Deploy
uses: nwtgck/actions-netlify@v1.1
with:
publish-dir: .
production-deploy: true
deploy-message: Commit ${{ github.sha }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}