Skip to content

Commit

Permalink
deploy to firebase hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
codyzu committed May 9, 2023
1 parent 499d26b commit d19b24f
Show file tree
Hide file tree
Showing 5 changed files with 3,624 additions and 38 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
# current LTS
node-version: 18
cache: "pnpm"

- name: Output debugging info
run: node -v && npm -v && pnpm -v

- name: Install
run: pnpm install

- name: Build
run: pnpm run build

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SUPA_PRESENTATION }}'
channelId: live
projectId: supa-presentation
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.firebase/hosting.ZGlzdA.cache
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"eslint": "^8.38.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"firebase-tools": "^11.30.0",
"typescript": "^5.0.2",
"unocss": "^0.51.12",
"vite": "^4.3.2",
Expand Down
Loading

0 comments on commit d19b24f

Please sign in to comment.