-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 988 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
36
37
38
39
40
41
name: Deploy to Netlify
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v3
# Install proper version of node
- uses: actions/setup-node@v3
with:
node-version: '16.x'
# Install v3.7.1 of gatsby-cli
- run: npm install -g [email protected]
# Install project dependencies
- run: npm install
# Run gatsby build
- run: gatsby build
env:
GATSBY_MAP_GOOGLE_API_KEY: ${{ secrets.GATSBY_MAP_GOOGLE_API_KEY }}
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './public'
production-branch: master
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 20