`firebase deploy` without firebase.json
See original GitHub issueWe have a project that generates four different artifact-websites, each of these has to be deployed to a different Firebase project. We could generate a separate firebase.json file for each but I don’t think it makes much sense. firebase.json is used to generate an archive that’s pushed to Firebase. Why not let us provide everything that’s configurable in JSON file via parameters to firebase deploy
? This approach plays really well with CI and fully automated deployments of multiple projects at once.
Here’s an example - this firebase deploy
call is equivalent to having a JSON file.
firebase deploy \
--firebase project-name \
--public ./build
--ignore firebase.json \
--ignore '**/.*'
--ignore '**/node_modules/**'
--token abcd
{
"firebase": "project-name",
"public": "./build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Configure Hosting behavior | Firebase Hosting - Google
json file define which files in your project directory should be deployed to your Firebase project.
Read more >Firebase deploy firebase.json only - Stack Overflow
I'm currently doing firebase deploy --only hosting but that will deploy all the assets. I'm asking because I want to test out my...
Read more >Deploy Firebase Functions using GitHub Actions - Dave Sugden
Create a Google Service Account and download a key file (json format) — save this key as a Secret in your GitHub repository....
Read more >Deploying to Firebase | Cloud Build Documentation
In your repository, add a build config file with steps to invoke the firebase deploy command where project-id is your Cloud project ID:...
Read more >Deploying to Firebase Hosting
Using Firebase Hosting, we can deploy our application's static files (HTML, CSS, JavaScript, etc) to the web ... This will generate a firebase.json...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For my own personal sake I only need
--public
, and nothing else. - I only want to get rid of a file I actually don’t need.However, if I had to specify a lot of configuration, but for different environments, I would prefer specifying the name of a configuration file, .e.g,
--config firebase-dev.json
.Or perhaps
--config dev
, and dev is a property under{"firebase": { "dev": { ... } }
in package.json.It’s going to be extremely difficult to enumerate the entire array of possible config as command-line options. I’d be more amenable to being able to pass the config JSON inline:
WDYT?