



That's brilliant.īy the way, in the actions, I also had to manually add this line before flutter build web: - uses: is so that it installs the Flutter environment before attempting to compile. Looks like Firebase bought the web.app domain. The other deploys to the live channel, which looks like. One compiles the app and deploys to a temporary domain. The script generates firebase.json and a. I Writing configuration info to firebase.json. I Action required: Push any new workflow file(s) to your repo I Action required: Visit this URL to revoke authorization for the Firebase CLI GitHub OAuth App: I typically run firebase init in the root of my project, and then point public in firebase.json to the output of the flutter web build. Most likely the public folder in there, which determines from what directory files are served, points to the wrong location. ✔ Created workflow file /Users/anhtuan/git//.github/workflows/firebase-hosting-merge.yml Check the firebase.json file, which controls your hosting setup. ? What is the name of the GitHub branch associated with your site's live channel? main ? Set up automatic deployment to your site's live channel when a PR is merged? Yes ✔ Created workflow file /Users/anhtuan/git//.github/workflows/firebase-hosting-pull-request.yml

? What script should be run before every deploy? flutter build web ? Set up the workflow to run a build script before every deploy? Yes I You can manage your secrets at /settings/secrets. ✔ Uploaded service account JSON to GitHub as secret FIREBASE_SERVICE_ACCOUNT_. ✔ Created service account github-action- with Firebase Hosting admin permissions.
#Flutter firebase hosting how to#
? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository) atn832/ Build a complete web app with Flutter web and Cloud Firebase Firestone Master advanced Flutter APIs such as providers and routing Learn how to use Firebase. I Authorizing with GitHub to upload your service account to a GitHub repository's secrets store. Assuming /Users/anhtuan/git/agaskin_manual is the project root. You can create multiple project aliases by running firebase use -add,īut for now we'll just set up a default project. * You are initializing within an existing Firebase project directoryįirst, let's associate this project directory with a Firebase project. You're about to initialize a Firebase project in this directory: The most important one was this: What script should be run before every deploy? flutter build web % firebase init hosting:github It told he I should run firebase init hosting:github. Here's how I did it.įirst I went over to. I wanted to automatically compile and deploy a Flutter web app to Firebase Hosting as I merged a PR to the main branch on GitHub.
