From 643207e111d3481efc088e21ba2f25ffdab9a67f Mon Sep 17 00:00:00 2001 From: NiNinanana Date: Fri, 8 Mar 2024 23:49:06 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20firebase=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/firebase-hosting-merge.yml | 23 +++++++++++++++++++ .../firebase-hosting-pull-request.yml | 20 ++++++++++++++++ apps/client/.firebaserc | 5 ++++ apps/client/.gitignore | 2 ++ apps/client/firebase.json | 13 +++++++++++ 5 files changed, 63 insertions(+) create mode 100644 .github/workflows/firebase-hosting-merge.yml create mode 100644 .github/workflows/firebase-hosting-pull-request.yml create mode 100644 apps/client/.firebaserc create mode 100644 apps/client/firebase.json diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 00000000..039abafa --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -0,0 +1,23 @@ +# 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 + - 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..3f6e7698 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -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 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 + - 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" + } + } +} From d6e098578e0e4b644abd9a151189629f90d5bc02 Mon Sep 17 00:00:00 2001 From: NiNinanana Date: Fri, 8 Mar 2024 23:55:23 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20firebase=20hosting=20deploy=20r?= =?UTF-8?q?un=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/firebase-hosting-merge.yml | 2 +- .github/workflows/firebase-hosting-pull-request.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 039abafa..dfeec78b 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -14,7 +14,7 @@ jobs: - run: | npm install -g pnpm pnpm install - pnpm build + pnpm build:client - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 3f6e7698..5c721d98 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -12,7 +12,7 @@ jobs: - run: | npm install -g pnpm pnpm install - pnpm build + pnpm build:client - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" From 3fb743a7727bf13f29470093f780d9e96dbed57e Mon Sep 17 00:00:00 2001 From: NiNinanana Date: Sat, 9 Mar 2024 17:19:26 +0900 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20working-directory=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/firebase-hosting-merge.yml | 3 ++- .github/workflows/firebase-hosting-pull-request.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index dfeec78b..b39465a6 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -14,7 +14,8 @@ jobs: - run: | npm install -g pnpm pnpm install - pnpm build:client + pnpm build + working-directory: apps/client - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 5c721d98..38296694 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -12,7 +12,8 @@ jobs: - run: | npm install -g pnpm pnpm install - pnpm build:client + pnpm build + working-directory: apps/client - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}"