Firebase hosting deploy to other site

我怕爱的太早我们不能终老 提交于 2020-08-07 03:48:32

问题


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).

Thanks


回答1:


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.

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


来源:https://stackoverflow.com/questions/52170023/firebase-hosting-deploy-to-other-site

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