action-hosting-deploy icon indicating copy to clipboard operation
action-hosting-deploy copied to clipboard

[BUG/Feature Request] Parameter to pass the config file

Open AbhishekDoshi26 opened this issue 2 years ago • 3 comments

The use case you're trying to solve

I have 2 flavors and different headers for each flavor. So I have created 2 separate firebase.json files. My first approach was to keep these files in the root project directory with separate names. This works if we use firebase --config=firebase-dev.json deploy command directly. But for the github actions, we have a param for entryPoint which takes the path where firebase.json file can be found.

Change to the action that would solve that use case

There should be a parameter to pass the config file. Right now, for example, you can use firebase --config=./firebase-dev.json deploy command, and it will use firebase-dev.json instead of firebase.json as config file.

Other considerations

Other way to solve this problem is to create 2 folders inside your project each containing a separate firebase.json file. Now, the issue is, if we specify entrypoint ./firebase_config/prod, it successfully fetches the firebase.json file available inside. But now, when it comes to deployment, it tries to find the public folder inside firebase_config/prod and sends error that public folder not found for hosting. So there should be another parameter in the actions build which will take the path that needs to be deployed.

AbhishekDoshi26 avatar Dec 27 '22 20:12 AbhishekDoshi26

This would be great. We have an nx workspace with multiple different firebase.json files. We'd like to keep them in the same top-level directory instead of subdirectories, otherwise we would have to duplicate the .firebasercas well.

ciriousjoker avatar Mar 15 '23 22:03 ciriousjoker

@Salakar any thoughts on this?

AbhishekDoshi26 avatar Mar 15 '23 22:03 AbhishekDoshi26

Is there any status update of this? It is useful for multi sites.

fan123199 avatar Jun 11 '24 09:06 fan123199