Skip to content

Commit 8016d67

Browse files
author
Claude Code Developer
committed
feat: add Firebase hosting configuration and deployment scripts
Signed-off-by: Claude Code Developer <dev@localhost>
1 parent 3e90743 commit 8016d67

5 files changed

Lines changed: 61 additions & 1 deletion

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
- uses: actions/checkout@v4
14+
- run: npm ci && npm run build
15+
- uses: FirebaseExtended/action-hosting-deploy@v0
16+
with:
17+
repoToken: ${{ secrets.GITHUB_TOKEN }}
18+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PYTHON_CAMEROON }}
19+
channelId: live
20+
projectId: python-cameroon
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
- uses: actions/checkout@v4
16+
- run: npm ci && npm run build
17+
- uses: FirebaseExtended/action-hosting-deploy@v0
18+
with:
19+
repoToken: ${{ secrets.GITHUB_TOKEN }}
20+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PYTHON_CAMEROON }}
21+
projectId: python-cameroon

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
# Firebase
27+
.firebase/
28+
.firebaserc

firebase.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"hosting": {
3+
"source": ".",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
],
9+
"frameworksBackend": {
10+
"region": "us-east1"
11+
}
12+
}
13+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"build": "tsc && vite build",
2121
"start": "vite preview",
2222
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
23-
"preview": "vite preview"
23+
"preview": "vite preview",
24+
"deploy": "npm run build && firebase deploy --only hosting",
25+
"deploy:preview": "npm run build && firebase hosting:channel:deploy preview"
2426
},
2527
"dependencies": {
2628
"@radix-ui/react-accordion": "^1.2.0",

0 commit comments

Comments
 (0)