Skip to Content

Deploy only static assets with Firebase

Thanks to the --only hosting flag

Posted on One min read

This website is actually just a static website. I used the super fast and extensible Hugo static site generator. I registered the domain names via Google Domains. And the whole content is hosted using Firebase’s static hosting capabilities.

When you deploy your Firebase project from the command-line, you use the instruction:

$ firebase deploy

You’ll have noticed that it’s updating your Firebase database or Firestore configuration, or that it prepares and deploys your Cloud Functions. But in my case, I’m using neither stored data, nor functions, so running the full deploy function was a bit cumbersome (even if it’s not that slow anyway).

Here’s the tip of the day: to squeeze in some more juice, and deploy my project faster, I can specify that I want to deploy only the static content with the following command:

$ firebase deploy --only hosting
comments powered by Disqus