Skip to content

Commit

Permalink
firebase hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarebyze committed Jan 25, 2023
1 parent 6aa710f commit e401c73
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 17 deletions.
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@v2
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MOVIEMATES_C4E06 }}'
channelId: live
projectId: moviemates-c4e06
17 changes: 17 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MOVIEMATES_C4E06 }}'
projectId: moviemates-c4e06
4 changes: 4 additions & 0 deletions frontend/.firebase/hosting.cHVibGlj.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
index.html,1674686513880,c21031ce7ece3518b7042ac8c6d3ef9dff0db1b469e2c98655298ebf217fcc8f
img/favicon.ico,1674656130672,f58be5939b898167c14911874fdaa837dbc1b95c321b3b1656de61024e33e5fc
img/FooterBG.png,1674663189205,4bca252c15ca924a6368ff180567c35bdd256bdbbcd5a8d2b50ab4f57c04e721
img/BG.png,1674643567485,70e5a87766079c6a3f3f1c396b8ccf504f12a646ef7635ea5b56b621f36a1726
5 changes: 5 additions & 0 deletions frontend/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "moviemates-c4e06"
}
}
36 changes: 19 additions & 17 deletions frontend/firebase.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@


{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}
}
4 changes: 4 additions & 0 deletions frontend/firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"indexes": [],
"fieldOverrides": []
}
9 changes: 9 additions & 0 deletions frontend/firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if
request.time < timestamp.date(2023, 2, 24);
}
}
}

0 comments on commit e401c73

Please sign in to comment.