angular / angular/angularfire

Deploying to multiple firebase sites using angularFire and ng deploy

未關閉
#3,309 12 則留言 1 個 reaction 已指派 1 人 已被 @davideast 認領 在 GitHub 檢視
主要語言
TypeScript
星號
7.8k
分支
2.2k
平均合併
22 小時 28 分鐘
30 天內合併 PR
6

描述

Versions:
"@angular/cli": "^14.2.10",
"@angular/cdk": "^14.2.1",
"@angular/fire": "^7.4.1",
"firebase": "^9.6.8",

I am having issues with setting up config to allow deploying to a dev/prod sites on Firebase hosting. The sites on firebase are in the same firebase project

I have followed this guide
https://github.com/angular/angularfire/blob/master/docs/deploy/getting-started.md

but I am receiving the same issue as these old unanswered github issues
https://github.com/angular/angularfire/issues/3077

https://github.com/angular/angularfire/issues/3076

Here is my setup

1) angular.json
```
"deploy": {
"builder": "@angular/fire:deploy",
"options": {
"firebaseProject": "<>",
"siteTarget": "devTarget",
"buildTarget": "<>:build:development"
},
"configurations": {
"dev": {
"firebaseProject": "<>",
"siteTarget": "devTarget",
"buildTarget": "<>:build:development"
},
"prod": {
"firebaseProject": "<>",
"siteTarget": "prodTarget",
"buildTarget": "<>:build:development"
}
}
}
}
```

2. firebase.json

```
{
"hosting": [
{
"target": "devTarget",
"public": "dist",
"ignore": [
"**/.*"
]
},
{
"target": "prodTarget",
"public": "dist",
"ignore": [
"**/.*"
]
}
]
}
```

3. .firebaserc
```
{
"projects": {
"default": "<>"
},
"targets": {
"<>": {
"hosting": {
"devTarget": [
"<>"
],
"prodTarget": [
"<>"
]
}
},
"etags": {}
}

```

Should this work if i run ``` ng deploy <> --configuration='dev'```?

I receive the following error from ```node_modules\@angular\fire\schematics\deploy\builder.js:36:15```

```
An unhandled exception occurred: The Firebase Hosting Site specified by your angular.json or .firebaserc is in conflict
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。