Setting up Firebase Flutter Web Application and Initiating GitHub Auto Deploy on Build to the Cloud

Setting up Firebase Flutter Web Application and Initiating GitHub Auto Deploy on Build to the Cloud

flutter web application

Firebase web hosting is a great way to launch your Flutter web apps. I have building mobile applications using Dart with Flutter and web app using Java, PHP, React and C#.

However, I do enjoy learning a ton of what can be done as quick and dirty as possible to build prototypes of an idea.

That much is great. So i decided to build my next enterprise web application using Flutter. And these were the first challenges are encountered.

Alright so I’m setting up a Marketing Representative Management System on Firebase for a web app that I made. A system tool for my colleagues job that would make things a bit easier for them.

After creating the project on firebase cloud and started the project initialization on CLI,

I perform firebase init > Login > Select project > configure hosting options > Setup automatic builds and deploys with Github?

this pops up, and like wow..... super cool. so i said YES!!!!!

And it popped up For which Github repository would you like to setup a Github workflow? (username/repositoryName)

That’s where I got stuck there was no instruction no (ex. blah blah blah). Which is in a lot of there questions they show an example for those new to the process. I did a quick google search and couldn’t find an easy quick solution. I tried random stuff.

cli firebae flutter.PNG

First I tried the github repository URL. That didn’t work. Then I tried just typing in the repository name. That didn’t work. Lastly, I thought oh it shows my username/repositoryName cool let me try that. Boom it works.

So based on that i decided to write a complete guide on how go about the whole questions and set up

For which Github repository would you like to setup a Github workflow? (username/repositoryName) - means supply username/the repository name of the project

Setup the workflow to run a build script before every deploy? (Yes\No) - Means do you want to have a script run before any deployment is made

It simply means that before deploying, should a specific script be run? For example, you may need to run a command to build some sources. In Flutter, you would need to build before deploying, so the command to enter would be:

project Directory/flutter build web

What is the name of the Github branch associated with your site’s live channel? (master) - Select your channel to be used to deploy to the Firebase

cli firebae flutter 2.PNG

Thanks for your time