Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase hosting deploy to other site

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

like image 316
Stefan Avatar asked Sep 04 '18 15:09

Stefan


1 Answers

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
like image 114
abraham Avatar answered Oct 19 '22 19:10

abraham