AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Flutter firebase hosting8/7/2023 In the following lesson, you will learn how to setup mulitsite hosting in Firebase from scratch. The obvious benefit here is resource sharing across multiple domains with common use cases including:ĭemo of multiple sites hosted by single Firebase Project In the past, we would have to get clever with deployment by either sharing the same URL or juggling multiple projects. For example, you might have two separate apps - one for customers, one for admin employees - both of which share the same database and functions. I am thrilled to see this feature because it is such a common requirement for real world apps. If you have any question feedback you can let me know in the comments below.Deploy Multiple Sites to Firebase Hostingįirebase hosting recently announced support for multiple hosting targets within a single project. Then it will open a browser window to login select the gmail account by which you have firebase account which contains this hosting.Ĭopy the key and go to Project > Settings > Secrets > New Secret > Enter “FIREBASE_TOKEN” for (YOUR_SECRET_NAME) and value will be key. To get Personal access token your git profile >settings> Developer settings> Personal Access Token> Generate new token > select only ‘repo’ scope and give a good name that’s it.Ĭopy the key and go to Project > Settings > Secrets > New Secret > Enter “TOKEN” for (YOUR_SECRET_NAME) and value will be key.įor getting Firebase Token run this command in the terminal in the project directory $ firebase login:ci deploy to Firebase hosting as well as github pagesįor this we will need two Tokens you can call then secret keys, first is “Personal access tokens” second is “Firebase Token”. Let’s configure flutter web or you can say enable flutter web.Setup Flutter environment for Github Actions for which we will use subosito/flutter-action.Let’s go through the steps to meet our requirements. These steps can be granular like one line command or a multiline with sequence of task pack together. Sequence of tasks a job contain are called steps. # This workflow contains a single job called "build" Runs-on define the virtual machine to run the job on, for our case we need ubuntu-latest.Įach ubuntu host machine contains different set of softwares and tools you can check them here. In this example we want to run it only when we push to master branch, you can add any of your preferred branches name: Build, Release app to Github Pages and Firebase HostingĪ workflow run is made up of one or more jobs that can run sequentially or in parallel. Github action is executed following the events under on key. Now create a workflow file let’s name it deploy.yml (you can name it whatever you want), workflow file has multiple keys we will discuss each one by one. github this will contain all the workflow. We have to create a custom workflow to auto-deploy of flutter app to GitHub pages, so just follow step by step 1.Creating workflow fileįirst go inside your main project directory and create a folder. When we integrate github action all the workflows and build will be visible here. Get Started with Github Action For Flutter.įirst lets integrate Github Action to our Github Repo. Github actions help us to automate our workflow be it building apk, running test, hosting our app to Github, hosting a flutter web app to firebase hosting so that we can build test and deploy right from GitHub. In this blog post, we will learn how to automate it so that whenever we will commit the latest version of our flutter web app will be deployed to Github Pages For Free by using Github Actions.
0 Comments
Read More
Leave a Reply. |