Efficient Manual Deployment of Firebase Web to Hosting: A Step-by-Step Guide

Efficient Manual Deployment of Firebase Web to Hosting: A Step-by-Step Guide

As we know that Without automatic builds and deploys, we will handle the process yourself every time you want to update your web app.

Prerequisite:

Make sure that your Flutter web app is connected to Firebase as shown in this article.

Now that's done, let's see how to deploy it manually to hosting:

Step 1: Build Your Flutter Web App Locally

You need to compile your Flutter application into web-compatible files (HTML, CSS, JavaScript) that can be served by a web server. This is done using the Flutter command line:

flutter build web

The above command generates a build/web directory with all the necessary files optimized for deployment.

Step 2: Deploy Using Firebase CLI

Once you have your web application built, you use the Firebase CLI to manually deploy these files to Firebase Hosting. First, make sure you are logged into Firebase on your command line:

firebase login

Then, navigate to your project directory and deploy the web app:

firebase deploy --only hosting

And that's it you are done.

In summary, if you opt out of automatic deployments, you'll need to manage and execute the build and deployment processes manually every time you make changes that you want to reflect in your live web application. This method gives you control but requires more attention and effort to maintain.

Did you find this article valuable?

Support Harish Kunchala by becoming a sponsor. Any amount is appreciated!