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
Copy file name to clipboardExpand all lines: docs/deploy/getting-started.md
+62-1
Original file line number
Diff line number
Diff line change
@@ -140,4 +140,65 @@ The above configuration specifies the following:
140
140
2.`ng deploy projectName` will deploy the specified project with default configuration.
141
141
3.`ng deploy projectName --prod` or `ng deploy projectName --configuration='production'` will deploy `projectName` with production build settings to your production environment.
142
142
143
-
All of the options are optional. If you do not specify a `buildTarget`, it defaults to a production build (`projectName:build:production`). If you do not specify a `firebaseProject`, it defaults to the first matching deploy target found in your `.firebaserc` (where your projectName is the same as your Firebase deploy target name). The `configurations` section is also optional.
143
+
All of the options are optional. If you do not specify a `buildTarget`, it defaults to a production build (`projectName:build:production`). If you do not specify a `firebaseProject`, it defaults to the first matching deploy target found in your `.firebaserc` (where your projectName is the same as your Firebase deploy target name). The `configurations` section is also optional.
144
+
145
+
### Working with multiple project sites
146
+
147
+
For example, if you have muti sites config in firebase.json like this:
148
+
```
149
+
{
150
+
"hosting": [
151
+
{
152
+
"target": "custom-site",
153
+
"public": "public/my-custom-site",
154
+
"ignore": [
155
+
"firebase.json",
156
+
"**/.*",
157
+
"**/node_modules/**"
158
+
],
159
+
"rewrites": [
160
+
{
161
+
"source": "**",
162
+
"destination": "/index.html"
163
+
}
164
+
]
165
+
}
166
+
],
167
+
```
168
+
169
+
If you have multiple build targets and deploy targets, it is possible to specify them in your `angular.json` or `workspace.json`.
170
+
171
+
It is possible to use either your project name or project alias in `siteTarget`.
172
+
173
+
You may specify a `siteTarget` in your `options` as follows:
174
+
175
+
```json
176
+
"deploy": {
177
+
"builder": "@angular/fire:deploy",
178
+
"options": {
179
+
"buildTarget": "projectName:build",
180
+
"firebaseProject": "developmentProject",
181
+
"siteTarget": "yourDefaultSiteTarget"
182
+
},
183
+
"configurations": {
184
+
"production": {
185
+
"buildTarget": "projectName:build:production",
186
+
"firebaseProject": "productionProject",
187
+
"siteTarget": "yourProdSiteTarget"
188
+
},
189
+
"storybook": {
190
+
"buildTarget": "projectName:build-storybook",
191
+
"firebaseProject": "developmentProject",
192
+
"siteTarget": "yourStorybookSiteTarget"
193
+
}
194
+
}
195
+
}
196
+
```
197
+
198
+
The above configuration specifies the following:
199
+
200
+
1.`ng deploy` will deploy the default project with default configuration.
201
+
2.`ng deploy projectName` will deploy the specified project with default configuration.
202
+
3.`ng deploy projectName --configuration=storybook --siteTarget=mySiteTarget` will deploy `projectName` to `mySiteTarget` with configuration`storybook`.
0 commit comments