Skip to content

Commit

Permalink
chore: 🤖 set up Firebase Hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
ginpei committed May 23, 2023
1 parent 50fa3dc commit 97d62ab
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
@@ -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:
- release
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm test
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FIR_C4868 }}'
channelId: live
projectId: fir-c4868
17 changes: 17 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
@@ -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@v3
- run: npm test
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FIR_C4868 }}'
projectId: fir-c4868
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -37,6 +37,7 @@ next-env.d.ts

# Firebase
.firebase-export/
.firebase/
.firebaserc
firebase-debug.log
firebase-export-*/
Expand Down
7 changes: 5 additions & 2 deletions firebase.json
Expand Up @@ -20,12 +20,15 @@
}
],
"hosting": {
"public": "out",
"source": ".",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
],
"frameworksBackend": {
"region": "us-west1"
}
},
"storage": {
"rules": "storage.rules"
Expand Down

0 comments on commit 97d62ab

Please sign in to comment.