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

╄→尐↘猪︶ㄣ 提交于 2019-12-01 15:59:31

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/34601488/can-i-add-additional-file-to-my-firebase-hosted-static-website-or-must-i-deploy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!