9

Can I deploy just the hosting configuration file, firebase.json instead of deploying all my assets ie. html files, images etc? If so, how?

I'm currently doing firebase deploy --only hosting but that will deploy all the assets.

I'm asking because I want to test out my rewrite rules etc and don't want to re-upload all the assets again which is time consuming. Thanks.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
user3240644
  • 2,211
  • 2
  • 24
  • 35

1 Answers1

9

There is currently no way to tell firebase deploy to only apply the changes in the firebase.json file.

But note that firebase deploy only deploys files on hosting, if the local file is different from the deployed version. So if none of the file are modified, it effectively only updates the other changes in your firebase.json file.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Is this still the case, as of today ? – Johan Chouquet Aug 05 '20 at 13:36
  • 2
    Yes. But note that `firebase deploy` will only deploy modified files these days. So if you changed no files, then it will not upload anything and just apply the changes to the rules in your `firebase.json`. I updated my answer to reflect this. – Frank van Puffelen Aug 05 '20 at 14:31