Skip to content

Commit

Permalink
feat: add firebase configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
anoblet committed Feb 1, 2024
1 parent e5108fe commit 44b8a09
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .firebaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"projects": {
"default": "cxl-jwp-app"
"default": "ott-web-app-9765c"
}
}
19 changes: 19 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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:
- develop
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_OTT_WEB_APP_9765C }}'
channelId: live
projectId: ott-web-app-9765c
18 changes: 18 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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_target
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ github.token }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_OTT_WEB_APP_9765C }}'
projectId: ott-web-app-9765c
2 changes: 1 addition & 1 deletion .github/workflows/release-deploy-prod-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_OTT_WEB_APP_9765C }}'
channelId: live
4 changes: 2 additions & 2 deletions .github/workflows/test-preview-and-lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
- uses: actions/checkout@v3
- name: Build Preview Link
env:
APP_PLAYER_LICENSE_KEY: ${{ secrets.PLAYER_LICENSE_KEY }}
APP_PLAYER_LICENSE_KEY: ${{ secrets.APP_PLAYER_LICENSE_KEY }}
run: yarn && MODE=preview yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
id: firebase_hosting_preview
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_OTT_WEB_APP_9765C }}'
expires: 30d

lhci:
Expand Down
3 changes: 1 addition & 2 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
],
"headers": [
{
"source":
"**/*.@(jpg|jpeg|gif|png|svg|webp|js|css|eot|otf|ttf|ttc|woff|woff2|font.css)",
"source": "**/*.@(jpg|jpeg|gif|png|svg|webp|js|css|eot|otf|ttf|ttc|woff|woff2|font.css)",
"headers": [
{
"key": "Cache-Control",
Expand Down

0 comments on commit 44b8a09

Please sign in to comment.