Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
1.Deploy to firebase
2.Change firebase authDomain to custom domain
  • Loading branch information
Jonchao committed Mar 20, 2024
1 parent 625763a commit acf4e5f
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "nextani-415707"
}
}
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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@v4
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_NEXTANI_415707 }}'
channelId: live
projectId: nextani-415707
21 changes: 21 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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 run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_NEXTANI_415707 }}"
projectId: nextani-415707
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

#firebase
/.firebase/
13 changes: 13 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"hosting": {
"source": ".",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"frameworksBackend": {
"region": "asia-east1"
}
}
}
2 changes: 1 addition & 1 deletion pages/login.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Input } from "@nextui-org/react";
import Link from "next/link";
import { useState, useMemo } from "react";
import Oauth2 from "@/components/auth/Oauth2";
import Oauth2 from "@/components/auth/oauth2";
import { useRouter } from "next/router";
import { EyeFilledIcon, EyeSlashFilledIcon } from "@/icons";
import { login } from "@/utils/firebaseAuth";
Expand Down
2 changes: 1 addition & 1 deletion utils/firebaseAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getAnalytics } from "firebase/analytics";
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyBUh34fVGomF1fmLtmwZyW_FIi9jRVZYFM",
authDomain: "nextani-415707.firebaseapp.com",
authDomain: "nextani.net",
projectId: "nextani-415707",
storageBucket: "nextani-415707.appspot.com",
messagingSenderId: "774743828666",
Expand Down

0 comments on commit acf4e5f

Please sign in to comment.