diff --git a/.firebaserc b/.firebaserc index e65982b..465d991 100644 --- a/.firebaserc +++ b/.firebaserc @@ -1,5 +1,5 @@ { "projects": { - "default": "flutter_ecommerce_website_demo" + "default": "flutter-ecommerce-website-demo" } } diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 98ff8c0..c809e33 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -1,6 +1,4 @@ -# Credited work: https://dev.to/mysticza/flutter-web-x-firebase-hosting-github-action-3fke - -# This file was PARTIALLY auto-generated by the Firebase CLI +# This file was auto-generated by the Firebase CLI # https://github.com/firebase/firebase-tools name: Deploy to Firebase Hosting on merge @@ -13,10 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: subosito/flutter-action@v1 #required (unofficial as no official tool exists, yet!) - with: - channel: 'stable' - - run: flutter pub get && flutter build web + - run: >- + sudo snap install flutter --classic && flutter clean && flutter build + web --web-renderer html --release - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' @@ -24,5 +21,4 @@ jobs: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLUTTER_ECOMMERCE_WEBSITE_DEMO }} channelId: live - projectId: flutter_ecommerce_website_demo - + projectId: flutter-ecommerce-website-demo diff --git a/firebase.json b/firebase.json index 0d25a77..6603732 100644 --- a/firebase.json +++ b/firebase.json @@ -5,6 +5,12 @@ "firebase.json", "**/.*", "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } ] } } diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart index 4b9682a..b835a18 100644 --- a/lib/firebase_options.dart +++ b/lib/firebase_options.dart @@ -44,11 +44,12 @@ class DefaultFirebaseOptions { } static const FirebaseOptions web = FirebaseOptions( - apiKey: "AIzaSyA0jl24nb9EsnGnGvu0IKs6nN0a4bYFSl0", - authDomain: "flutter-ecommerce-website-demo.firebaseapp.com", - projectId: "flutter-ecommerce-website-demo", - storageBucket: "flutter-ecommerce-website-demo.appspot.com", - messagingSenderId: "435676149986", - appId: "1:435676149986:web:40fca7cdaa7c2f066986bb", - measurementId: "G-M8V7JGW66F"); + apiKey: "AIzaSyA0jl24nb9EsnGnGvu0IKs6nN0a4bYFSl0", + authDomain: "flutter-ecommerce-website-demo.firebaseapp.com", + projectId: "flutter-ecommerce-website-demo", + storageBucket: "flutter-ecommerce-website-demo.appspot.com", + messagingSenderId: "435676149986", + appId: "1:435676149986:web:40fca7cdaa7c2f066986bb", + measurementId: "G-M8V7JGW66F", + ); }