diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 00000000..b39465a6 --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -0,0 +1,24 @@ +# 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 install -g pnpm + pnpm install + pnpm build + working-directory: apps/client + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_MYUNGMOON_675E2 }}" + channelId: live + projectId: myungmoon-675e2 diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 00000000..38296694 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -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 +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 install -g pnpm + pnpm install + pnpm build + working-directory: apps/client + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_MYUNGMOON_675E2 }}" + projectId: myungmoon-675e2 diff --git a/apps/client/.firebaserc b/apps/client/.firebaserc new file mode 100644 index 00000000..24284fd0 --- /dev/null +++ b/apps/client/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "myungmoon-675e2" + } +} diff --git a/apps/client/.gitignore b/apps/client/.gitignore index fd3dbb57..19e91157 100644 --- a/apps/client/.gitignore +++ b/apps/client/.gitignore @@ -15,6 +15,7 @@ # production /build +.firebase # misc .DS_Store @@ -24,6 +25,7 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +firebase-debug.log # local env files .env*.local diff --git a/apps/client/firebase.json b/apps/client/firebase.json new file mode 100644 index 00000000..461fe72e --- /dev/null +++ b/apps/client/firebase.json @@ -0,0 +1,13 @@ +{ + "hosting": { + "source": ".", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "frameworksBackend": { + "region": "asia-east1" + } + } +}