FirebaseExtended / action-hosting-deploy

Automatically deploy shareable previews for your Firebase Hosting sites
https://firebase.google.com/docs/hosting/github-integration
Apache License 2.0
704 stars 202 forks source link

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

Open AbhishekDoshi26 opened 1 year ago

AbhishekDoshi26 commented 1 year ago

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.

ciriousjoker commented 1 year ago

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.

AbhishekDoshi26 commented 1 year ago

@Salakar any thoughts on this?

fan123199 commented 5 months ago

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