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
- `ng deploy` – Angular project is build in production mode
182
-
- `ng deploy --configuration=test` – Angular project is using the configuration `test` (this configuration must exist in the `angular.json` file)
180
+
-`ng deploy` – Angular project is build in `production` mode
181
+
-`ng deploy --build-target=test` – Angular project is using the build configuration `test` (this configuration must exist in the `angular.json` file)
182
+
183
+
If no buildTarget is set, the `production` build of the default project will be chosen.
184
+
The `buildTarget` simply points to an existing build configuration for your project, as specified in the `configurations` section of `angular.json`.
185
+
Most projects have a default configuration and a production configuration (commonly activated by using the `--prod` flag) but it is possible to specify as many build configurations as needed.
183
186
184
-
A named build target, as specified in the `configurations` section of `angular.json`.
185
-
Each named target is accompanied by a configuration of option defaults for that target.
186
-
Same as `ng build --configuration=XXX`.
187
-
This command has no effect if the option `--no-build` option is active.
187
+
This is equivalent as calling the command `ng build --configuration=XXX`."
188
+
This command has no effect if the option `--no-build` is active.
188
189
189
190
#### --no-build <aname="no-build"></a>
190
191
@@ -196,7 +197,7 @@ This command has no effect if the option `--no-build` option is active.
196
197
197
198
Skip build process during deployment.
198
199
This can be used when you are sure that you haven't changed anything and want to deploy with the latest artifact.
199
-
This command causes the `--configuration` setting to have no effect.-->
200
+
This command causes the `--configuration` setting to have no effect.
200
201
201
202
#### --repo <aname="repo"></a>
202
203
@@ -313,7 +314,7 @@ This can be very useful because it outputs what would happen without doing anyth
313
314
To avoid all these command-line cmd options, you can write down your configuration in the `angular.json` file in the `options` attribute of your deploy project's architect. Just change the kebab-case to lower camel case. This is the notation of all options in lower camel case:
314
315
315
316
- baseHref
316
-
-configuration
317
+
-buildTarget
317
318
- noBuild
318
319
- repo
319
320
- message
@@ -346,20 +347,21 @@ becomes
346
347
}
347
348
```
348
349
349
-
And just run `ng deploy`😄.
350
+
Now you can just run `ng deploy`without all the options in the command line! 😄
350
351
351
352
> **ℹ️ Hint**
352
353
>
353
354
> You can always use the [--dry-run](#dry-run) option to verify if your configuration is right.
355
+
> The project will build but not deploy.
354
356
355
357
## 🌍 Environments <aname="environments"></a>
356
358
357
359
We have seen `angular-cli-ghpages` running on various environments, like Travis CI, CircleCi or Github Actions.
358
360
Please share your knowledge by writing an article about how to set up the deployment.
359
361
360
362
1.[GitHub Actions](https://github.com/angular-schule/angular-cli-ghpages/blob/master/docs/README_environment_github_actions.md) by [Dharmen Shah](https://github.com/shhdharmen)
Copy file name to clipboardExpand all lines: src/deploy/schema.json
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,9 @@
7
7
"type": "string",
8
8
"description": "Base url for the application being built. Same as `ng build --base-href=/XXX/`."
9
9
},
10
-
"configuration": {
10
+
"buildTarget": {
11
11
"type": "string",
12
-
"default": "production",
13
-
"description": "A named build target, as specified in the `configurations` section of angular.json. Each named target is accompanied by a configuration of option defaults for that target. Same as `ng build --configuration=XXX`.",
14
-
"alias": "c"
12
+
"description": "A named build target, as specified in the `configurations` section of angular.json . Each named target is accompanied by a configuration of option defaults for that target. This is equivalent as calling the command `ng build --configuration=XXX`."
0 commit comments