-
Notifications
You must be signed in to change notification settings - Fork 110
42 lines (32 loc) · 1.03 KB
/
netflify.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
name: Deploy to Netlify on pull requests
on: [push, workflow_dispatch]
env:
node_version: 14.x
jobs:
environment:
name: 🌱 Load Environment
runs-on: ubuntu-latest
steps:
- name: ⚙️ Node.js version used - ${{ env.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.node_version }}
build:
runs-on: ubuntu-latest
needs: [environment]
steps:
# Checkout repo
- uses: actions/checkout@v2
- name: Prepare
run: yarn install --frozen-lockfile
- name: Install Netlify
run: yarn add netlify-cli
# We use the "no-sapling" build so the 50 MB parameters file isn't downloaded
- name: Build site
run: yarn run build:no-sapling
# Deploy the site with netlify-cli
- name: Deploy Site
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: netlify deploy --dir=www --alias=$GITHUB_SHA --message=$GITHUB_SHA