Ryan
Ryan

Reputation: 750

When deploying firebase files, index.html is not being updated

When I open a terminal in my firebase folder with all the dependancies and files etc, and I type 'firebase deploy' into the terminal, all works fine and functions are updated and rules are updated, but the changes to index.html are not pushed to the website. Is there a setting I can check or something that would make it push again?

Upvotes: 0

Views: 2851

Answers (2)

Ronnie Smith
Ronnie Smith

Reputation: 18575

Put your index.html file in the /public folder, which is what is being served on Firebase Hosting. This is the way you want it. You don't want to publish files at the root directory.

Upvotes: 0

anoff
anoff

Reputation: 63

Assuming you are hosting the index.html in addition to function deployments: Is the index.html file in the folder specified under "hosting": { and not in the ignored files?

You can also run firebase deploy --only hosting to only deploy hosting related changes.

Since the file is in your root directory you need to set that as the public directory for firebase

{
  "hosting": {
    "public": "/",
    ...
  }
}

Upvotes: 1

Related Questions