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 摘要。