Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I add additional file to my Firebase hosted static website, or must I deploy the entire site every time?

We plan to host a fairly large set of static files with Firebase Hosting. Is it possible to deploy only new files to Firebase Hosting, without having the entire site available?

We essentially want to do an "update" deploy, not a "full" deploy. We want to add files.

The context: on every Travis build, we generate new docs, and want to add those docs to our site. We don't have the entire site available at that point, only the newly generated files.

Thanks!

like image 500
Seth Ladd Avatar asked Jan 04 '16 23:01

Seth Ladd


1 Answers

At the moment running firebase deploy will redeploy the entire site. There is no way to deploy only a specific part of the site or only the items that were changed/added.


Update: since mid 2018 the Firebase CLI will only deploy files that don't yet exist on the Firebase Hosting servers. This means that if you only update (or add) a single file, that's (likely) the only file that will be sent to the server when you run firebase deploy.

This so-called "delta deploy" is made possible by a new REST API for Firebase Hosting. With this it is for example possible to deploy a single file, even if you don't have a full copy of the site on your dev machine. For an example of this, see Firebase Hosting Deploy Single File.

like image 152
Frank van Puffelen Avatar answered Oct 18 '22 20:10

Frank van Puffelen