You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This small change updates the `deploy` command to run the configured
`build` command before deployment.
Users who prefer the previous behavior can opt out by specifying
`--no-build` when running `netlify deploy`.
Copy file name to clipboardExpand all lines: docs/commands/deploy.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -86,13 +86,13 @@ netlify deploy
86
86
87
87
-`alias` (*string*) - Specifies the alias for deployment, the string at the beginning of the deploy subdomain. Useful for creating predictable deployment URLs. Avoid setting an alias string to the same value as a deployed branch. `alias` doesn’t create a branch deploy and can’t be used in conjunction with the branch subdomain feature. Maximum 37 characters.
88
88
-`branch` (*string*) - Serves the same functionality as --alias. Deprecated and will be removed in future versions
89
-
-`build` (*boolean*) - Run build command before deploying
90
89
-`context` (*string*) - Specify a deploy context for environment variables read during the build (”production”, ”deploy-preview”, ”branch-deploy”, ”dev”) or `branch:your-branch` where `your-branch` is the name of a branch (default: dev)
91
90
-`dir` (*string*) - Specify a folder to deploy
92
91
-`filter` (*string*) - For monorepos, specify the name of the application to run the command in
93
92
-`functions` (*string*) - Specify a functions folder to deploy
94
93
-`json` (*boolean*) - Output deployment data as JSON
95
94
-`message` (*string*) - A short message to include in the deploy log
95
+
-`no-build` (*boolean*) - Do not run build command before deploying. Only use this if you have no need for a build or your site has already been built.
96
96
-`prod-if-unlocked` (*boolean*) - Deploy to production if unlocked, create a draft otherwise
97
97
-`debug` (*boolean*) - Print debugging information
98
98
-`auth` (*string*) - Netlify auth token - can be used to run this command without logging in
@@ -108,13 +108,14 @@ netlify deploy
108
108
```bash
109
109
netlify deploy
110
110
netlify deploy --site my-first-site
111
+
netlify deploy --no-build # Deploy without running a build first
111
112
netlify deploy --prod
112
113
netlify deploy --prod --open
113
114
netlify deploy --prod-if-unlocked
114
115
netlify deploy --message "A message with an $ENV_VAR"
'Do not run build command before deploying. Only use this if you have no need for a build or your site has already been built.',
124
+
)
113
125
.option(
114
126
'--context <context>',
115
127
'Specify a deploy context for environment variables read during the build (”production”, ”deploy-preview”, ”branch-deploy”, ”dev”) or `branch:your-branch` where `your-branch` is the name of a branch (default: dev)',
@@ -122,15 +134,24 @@ Support for package.json's main field, and intrinsic index.js entrypoints are co
122
134
.addExamples([
123
135
'netlify deploy',
124
136
'netlify deploy --site my-first-site',
137
+
'netlify deploy --no-build # Deploy without running a build first',
125
138
'netlify deploy --prod',
126
139
'netlify deploy --prod --open',
127
140
'netlify deploy --prod-if-unlocked',
128
141
'netlify deploy --message "A message with an $ENV_VAR"',
0 commit comments