Skip to content

Commit

Permalink
Merge pull request #4 from HewageNKM/firebase_hosting
Browse files Browse the repository at this point in the history
Firebase hosting added
  • Loading branch information
EthanBlake00 authored Aug 19, 2024
2 parents 5eaae54 + 3b0d241 commit 672bee7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PORTFOLIO_A05E4 }}
channelId: live
projectId: portfolio-a05e4
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
23 changes: 23 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PORTFOLIO_A05E4 }}
projectId: portfolio-a05e4
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
11 changes: 11 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,16 @@
},
"storage": {
"rules": "storage.rules"
},
"hosting": {
"source": ".",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"frameworksBackend": {
"region": "asia-east1"
}
}
}

0 comments on commit 672bee7

Please sign in to comment.