-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate firebase for deployment #727
Conversation
Visit the preview URL for this PR (updated for commit be9934d): https://mobu-waiwai--pr727-replace-netlify-with-o8u359jc.web.app (expires Thu, 01 Dec 2022 15:11:51 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 295e29f2bd6fa9acc70abd1b84aec0de70cff3f6 |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MOBU_WAIWAI }}' | ||
projectId: mobu-waiwai |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without specified expire, firebase keeps 7 days
- run: npm run build | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use https://github.com/kachick/wait-other-jobs in my repos just before deploy steps. However excluded in this PR for a simple first step.
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>Page Not Found</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has been generated by firebase CLI
APP_COMMIT_REF: JSON.stringify(commitRef), | ||
}, | ||
export default defineConfig(({ mode }) => { | ||
const env = loadEnv(mode, process.cwd()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import.meta can't be used in vite.config.ts
- name: Specify actual commit ref for revisions | ||
run: echo VITE_COMMIT_REF=${{ github.event.pull_request.head.sha }} > .env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
firebase actions looks generating special merging commit for internal use. It breaks #444 in staging deploy. So this and https://github.com/mobu-of-the-world/mobu/pull/727/files#r1031619146 is the workaround.
Talked with @pankona in discord. This feature is mandatory, so temporary I created the firebase project and integrated both 😬 So I'll turn off the netlify integration after merging. |
I didn't know we can invite other members into firebase project. So I just added members who committed into this repository with gmail. |
Resolved #726 to avoid netlify integration issues in #724
Basically imported from https://github.com/kachick/convert-color-json-between-windows-terminal-and-vscode/blob/3f97620134b8048d227eae08f0dc81ecc357d59e/.github/workflows/firebase-hosting-pull-request.yml