Skip to content

Commit 35313dc

Browse files
jbogarthydeKeen Yee Liau
authored and
Keen Yee Liau
committed
Add deploy command doc (#15402)
* docs: add deploy command doc * docs: fix json example * docs: add link to cli builder doc * docs: remove link * docs: restore link
1 parent 1a833ee commit 35313dc

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed
+20-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
The `ng deploy` command is a shortcut for:
1+
The command takes an optional project name, as specified in the `projects` section of the `angular.json` workspace configuration file.
2+
When a project name is not supplied, executes the `deploy` builder for the default project.
23

3-
```
4-
ng run [PROJECT_NAME]:deploy
5-
```
4+
To use the `ng deploy` command, use `ng add` to add a package that implements deployment capabilities to your favorite platform.
5+
Adding the package automatically updates your workspace configuration, adding a deployment
6+
[CLI builder](guide/cli-builder).
7+
For example:
68

7-
It takes an optional project name, as specified in the `projects` section of the `angular.json` workspace configuration file.
8-
9-
When a project name is not supplied, the CLI will execute the `deploy` builder for the default project.
9+
```json
10+
"projects": {
11+
"my-project": {
12+
...
13+
"architect": {
14+
...
15+
"deploy": {
16+
"builder": "@angular/fire:deploy",
17+
"options": {}
18+
}
19+
}
20+
}
21+
}
22+
```

packages/angular/cli/commands/deploy.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/schema",
33
"$id": "ng-cli://commands/deploy.json",
4-
"description": "Invokes the deploy builder for a specified project. If no project is specified, the CLI will invoke the deploy builder for the default project in the workspace.",
4+
"description": "Invokes the deploy builder for a specified project or for the default project in the workspace.",
55
"$longDescription": "./deploy-long.md",
66

77
"$aliases": [ "d" ],

0 commit comments

Comments
 (0)