angular / angular/angularfire

Deploying to multiple firebase sites using angularFire and ng deploy

Abierto
#3,309 12 comentarios 1 reacción 1 asignado Reclamado por @davideast Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
7.8k
Forks
2.2k
Merge medio
22 h 28 min
PR fusionados (30 d)
6

Descripción

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
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.