Firebase托管部署到其他站点 [英] Firebase hosting deploy to other site

查看:98
本文介绍了Firebase托管部署到其他站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何部署到同一项目中定义的其他Firebase托管站点. 我创建了多个托管站点"的firebase. 命令

how to deploy to other firebase hosting sites defined within the same project. I created multiple firebase hosting "sites". The command

firebase deploy

但是总是部署到第一个. 如何指定将静态文件部署到另一个站点"(和域).

however always deploys to the first one. How can I specify that the static files get deployed to another "site" (and domain).

谢谢

推荐答案

您必须将其他网站添加为

You have to add the other sites as deploy targets. If you have a second site named awesome-site-d3426:

$ firebase target:apply hosting awesome-app awesome-site-d3426

对于主站点,您可能需要做同样的事情.

You'll likely have to the same thing for the primary site.

告诉Firebase将什么部署到firebase.json中的哪些目标:

The tell Firebase what to deploy to which targets in firebase.json:

{
  "hosting": [
    {
      "target": "awesome-site",
      "public": "awesome-site/dist"
    },
    {
      ...
    }
  ]
}

然后您可以一次部署所有站点或特定站点:

You can then deploy all the sites at once or a specific site:

$ firebase deploy --only hosting:awesome-site

这篇关于Firebase托管部署到其他站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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