Search code examples
firebasefirebase-hosting

How to edit my static site in firebase hosting


I'm starting with Firebase Hosting, I made a static website with some Javascript elements. I have a simple question that I did not find clear information in the Firebase documentation: how would I edit my static site? Whether to change some information, or upload a new page? Do I deploy all over again like the first time I uploaded the site?


Solution

  • To make changes to a deployed Firebase Hosting website, you should make the necessary changes to your local copy and then run firebase deploy again.

    Each time you run firebase deploy after making a change, the following steps (amongst others) are performed automatically:

    • The version number is incremented
    • The current version becomes the previous version (and so on)
    • All changed files are uploaded
    • The changes are made live

    This is useful because the full history of your deploys are kept on Firebase Hosting so that you can rollback to a previous version should you need to.