Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase hosting and deploying only new/changed/touched files

I'm using Firebase Hosting for hosting a web app. I'm also hosting some small screencasts on the site, however every time I want to make a change to the app and deploy, I have to wait for the videos to be pushed.

Is there a way to selectively push changes to Firebase? Also, why does Firebase not simply push new/changed/touched files? I assume because its not doing any revision control for hosted applications and therefore isn't tracking such things, but that just makes the selective push much more of a need.

like image 590
MandM Avatar asked Nov 06 '14 20:11

MandM


People also ask

How do you update a file that I deployed to Firebase hosting?

You cannot change hosted files in the Firebase Console. Instead, you should change the index. html on your local copy where you initially ran the firebase deploy command. Once you're done with the changes, run firebase deploy again to push the updated version of your website to Firebase Hosting.

Is Firebase hosting dynamic?

Save and categorize content based on your preferences. Firebase Hosting provides fast and secure hosting for your web app, static and dynamic content, and microservices.

What script should be run before every deploy Firebase?

To deploy resources from a project directory, the project directory must have a firebase. json file. This file is automatically created for you by the firebase init command.


2 Answers

Currently, Firebase is not performing any sort of revision control, so automatic ignoring of files that haven't been changed/touched is not an option. However, in firebase.json, one can specify files to ignore in the .ignore section.

I had been looking for more of a manual option to specify in the command line when performing a firebase deploy, but performing it in the firebase.json file probably makes more sense if one knows the file has not been changed or does not need re-deploying.

https://www.firebase.com/docs/hosting/guide/deploying.html

From the docs:

ignore

"ignore": [
  "firebase.json",
  "**/.*",
  "**/node_modules/**"
]

optional - The ignore setting is an optional parameter since v1.0.1 of firebase-tools that specifies files to ignore on deploy. It can take glob definitions the same way Git handles .gitignore.

like image 124
MandM Avatar answered Sep 28 '22 07:09

MandM


I'm using WebStorm...I could never get the backgrounds or images in a gallery to upload or change...what I did was rename the files and have WebStorm refactor it...once I did that, gulp build and then firebase deploy seemed to fix it for me...I know it's a tad of a work-around, but this is silly it just won't push changes

like image 38
Jeff Hendricks Avatar answered Sep 28 '22 06:09

Jeff Hendricks