W.O. Wikacy
W.O. Wikacy

Reputation: 1

How to deploy static files only to firebase hosting

I am just trying to create a static landing page for my app with firebase hosting. The first time initialized and deployed the site it worked fine, but now that I am trying to tweak the design a little bit and upload better images, somehow my index.html file keeps getting overwritten with code that I do not need, I believe it is the firebase default index page which they create when you first set up a projext. I have tried it three times now and it keeps happening, and each time I have to recreate all the edits.

How do I simply deploy static files without all the extra code overwriting the page?

I cd into the folder containing my site, the public folder, and run firebase init, chose only hosting, then chose no for one page app, then no for the git deploy scripts, then run firebase deploy --only hosting --project (my project)

Each time, my index file gets erased and replaced with a firebase spontaneously created file.

I have searched the firebase docs and can find no explanation.

Please help

Upvotes: 0

Views: 847

Answers (1)

wbhill13
wbhill13

Reputation: 75

Try just running the firebase deploy command. If you run the firebase init command the first time and select the project, and make the public folder, then you should only have to run that command once. cd into the folder, and then just run firebase deploy.

Upvotes: 0

Related Questions