-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
75 lines (63 loc) · 2.42 KB
/
netlify.toml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
################################################################
# Generall Settings (deploy/branch)
# Settings in netlify.toml override settings in netlify's web interface
# from: https://github.com/wearelucid/nuxt-netlify-functions-example
################################################################
# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build]
command = "yarn production"
publish = "dist"
# avoid uncessary preview-deploy builds by ignoring automatic PRs
# from dependabot (saves build minutes).
ignore = "git log -1 --pretty=%B | grep dependabot"
# This formula can be used for other stuff as well,
# just change 'dependabot' with something else in the commit.
# [build.environment]
[build.environment]
APP_CONTEXT = 'development' # needed for serverless funcs
# Serverless (Netlify) Functions
[functions]
directory = "serverlessFunctions"
node_bundler = "esbuild"
# For a background function (can run up to 15mins):
# the function file name must end with -background,
# or the sub-directory that contains the background function file must end with -background
# these settings apply if the `netlify dev` command is used to run the app
[dev]
command = "yarn dev"
# port = 3000
# [dev.environment] NOT implemented by netlify
################################################################
# CONTEXT (deploy/branch)
# for different deployment modes or branches
################################################################
# all previews
# [context.deploy-preview.environment]
# APP_CONTEXT = 'stage'
# staging
[context.stage]
command = "yarn stage"
publish= "dist"
[context.stage.environment]
APP_CONTEXT = 'stage' # needed for serverless funcs
# all deploys from the branch set in Netlify UI as 'production'
[context.production]
command = "yarn production"
publish= "dist"
[context.production.environment]
APP_CONTEXT = 'production' # needed for serverless funcs
# ... NEVER set other Env Production Vars here (not secure)
# but always in the netlify UI
################################
# integration testing
# [context.test:integrations]
# command = "echo 'staging'"
# base = "staging"
# environment = {
# APP_CONTEXT = 'stage or test?'
# }
# Specific branch context: all deploys from this specific branch will inherit
# these settings.
# [context.branchName] # “staging” is a branch name
# }