Skip to content

Commit

Permalink
firebase init hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikezamayias committed Jan 18, 2022
1 parent ce55af1 commit 59152a0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .firebaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"projects": {
"default": "flutter_ecommerce_website_demo"
"default": "flutter-ecommerce-website-demo"
}
}
14 changes: 5 additions & 9 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -13,16 +11,14 @@ 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 }}'
firebaseServiceAccount: >-
${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLUTTER_ECOMMERCE_WEBSITE_DEMO
}}
channelId: live
projectId: flutter_ecommerce_website_demo

projectId: flutter-ecommerce-website-demo
6 changes: 6 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
15 changes: 8 additions & 7 deletions lib/firebase_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
}

0 comments on commit 59152a0

Please sign in to comment.