我可以在Firebase托管的静态网站中添加其他文件,还是必须每次都部署整个网站? [英] Can I add additional file to my Firebase hosted static website, or must I deploy the entire site every time?

查看:139
本文介绍了我可以在Firebase托管的静态网站中添加其他文件,还是必须每次都部署整个网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们计划使用Firebase Hosting托管大量静态文件.是否可以仅将新文件部署到Firebase Hosting,而无需整个站点可用?

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.

上下文:在每次Travis构建中,我们都会生成新文档,并希望将这些文档添加到我们的网站中.那时我们还没有整个站点可用,只有新生成的文件可用.

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.

谢谢!

推荐答案

目前运行firebase deploy会重新部署整个站点.无法仅部署网站的特定部分,或者仅部署已更改/添加的项目.

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.

更新:自2018年中以来,Firebase CLI将仅部署Firebase托管服务器上尚不存在的文件.这意味着,如果仅更新(或添加)单个文件,则(可能)是运行firebase deploy时将发送到服务器的唯一文件.

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.

新的用于Firebase托管的REST API使所谓的增量部署"成为可能.这样,即使您的开发机器上没有站点的完整副本,也可以部署单个文件.有关此示例,请参见 Firebase托管部署单个文件.

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.

这篇关于我可以在Firebase托管的静态网站中添加其他文件,还是必须每次都部署整个网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆