Skip to content

Commit

Permalink
update firebase hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
btkcodedev committed Jan 27, 2025
1 parent cc3fd5c commit e1721f9
Show file tree
Hide file tree
Showing 8 changed files with 1,050 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "elevateyoursoul"
}
}
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ELEVATEYOURSOUL }}
channelId: live
projectId: elevateyoursoul
21 changes: 21 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ELEVATEYOURSOUL }}
projectId: elevateyoursoul
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ dist-ssr
*.sln
*.sw?
.env
.firebase
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
52 changes: 52 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,58 @@

<!-- Primary Meta Tags -->
<title>ElevateYourSoul - Transform Your Mental Wellness Journey</title>
<!-- Firebase SDK -->
<script defer src="/__/firebase/11.2.0/firebase-app-compat.js"></script>
<!-- include only the Firebase features as you need -->
<script defer src="/__/firebase/11.2.0/firebase-auth-compat.js"></script>
<script defer src="/__/firebase/11.2.0/firebase-database-compat.js"></script>
<script defer src="/__/firebase/11.2.0/firebase-firestore-compat.js"></script>
<script defer src="/__/firebase/11.2.0/firebase-functions-compat.js"></script>
<script defer src="/__/firebase/11.2.0/firebase-messaging-compat.js"></script>
<script defer src="/__/firebase/11.2.0/firebase-storage-compat.js"></script>
<script defer src="/__/firebase/11.2.0/firebase-analytics-compat.js"></script>
<script defer src="/__/firebase/11.2.0/firebase-remote-config-compat.js"></script>
<script defer src="/__/firebase/11.2.0/firebase-performance-compat.js"></script>
<script defer src="/__/firebase/init.js?useEmulator=true"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const loadEl = document.querySelector('#load');
// // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
// // The Firebase SDK is initialized and available here!
//
// firebase.auth().onAuthStateChanged(user => { });
// firebase.database().ref('/path/to/ref').on('value', snapshot => { });
// firebase.firestore().doc('/foo/bar').get().then(() => { });
// firebase.functions().httpsCallable('yourFunction')().then(() => { });
// firebase.messaging().requestPermission().then(() => { });
// firebase.storage().ref('/path/to/ref').getDownloadURL().then(() => { });
// firebase.analytics(); // call to activate
// firebase.analytics().logEvent('tutorial_completed');
// firebase.performance(); // call to activate
//
// // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥

try {
let app = firebase.app();
let features = [
'auth',
'database',
'firestore',
'functions',
'messaging',
'storage',
'analytics',
'remoteConfig',
'performance',
].filter(feature => typeof app[feature] === 'function');
loadEl.textContent = `Firebase SDK loaded with ${features.join(', ')}`;
} catch (e) {
console.error(e);
loadEl.textContent = 'Error loading the Firebase SDK, check the console.';
}
});
</script>
<script defer src="/__/firebase/init.js?useEmulator=true"></script>
<meta name="title" content="ElevateYourSoul - Transform Your Mental Wellness Journey" />
<meta name="description" content="Discover inner peace and mental clarity with ElevateYourSoul. Expert-guided meditation, mood tracking, and mindfulness exercises for your personal growth journey." />
<meta name="keywords" content="mental wellness, meditation, mindfulness, personal growth, mental health app, mood tracking, self-improvement, wellness journey" />
Expand Down
Loading

0 comments on commit e1721f9

Please # to comment.