Skip to content

Commit 877bc42

Browse files
firebase intergration
1 parent 6bc3c14 commit 877bc42

4 files changed

Lines changed: 64 additions & 0 deletions

File tree

.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "odielosh"
4+
}
5+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on merge
5+
on:
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
build_and_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: pnpm-setup
14+
uses: pnpm/action-setup@v4
15+
with:
16+
version: latest
17+
- uses: actions/checkout@v4
18+
- run: pnpm i && pnpm run generate
19+
- uses: FirebaseExtended/action-hosting-deploy@v0
20+
with:
21+
repoToken: ${{ secrets.GITHUB_TOKEN }}
22+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ODIELOSH }}
23+
channelId: live
24+
projectId: odielosh
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on PR
5+
on: pull_request
6+
permissions:
7+
checks: write
8+
contents: read
9+
pull-requests: write
10+
jobs:
11+
build_and_preview:
12+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: pnpm-setup
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: latest
19+
- uses: actions/checkout@v4
20+
- run: pnpm i && pnpm run generate
21+
- uses: FirebaseExtended/action-hosting-deploy@v0
22+
with:
23+
repoToken: ${{ secrets.GITHUB_TOKEN }}
24+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ODIELOSH }}
25+
projectId: odielosh

firebase.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"hosting": {
3+
"public": ".output/public",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
]
9+
}
10+
}

0 commit comments

Comments
 (0)