From 01df3f1b87e351eb9b035adea90c6ea2074d989e Mon Sep 17 00:00:00 2001 From: Yuma Satake Date: Sat, 1 Jun 2024 10:03:14 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20firebase=20hosting=20=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .firebaserc | 5 +++++ .../firebase-hosting-pull-request.yml | 20 +++++++++++++++++++ .gitignore | 1 + firebase.json | 13 ++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 .firebaserc create mode 100644 .github/workflows/firebase-hosting-pull-request.yml create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..363efc7 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "hack-kansai-2024-web-tutorial" + } +} diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 0000000..ae34e8e --- /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 +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 + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_HACK_KANSAI_2024_WEB_TUTORIAL }} + projectId: hack-kansai-2024-web-tutorial diff --git a/.gitignore b/.gitignore index 314cd33..8752519 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ dist-ssr .env .env.local +.firebase \ No newline at end of file diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..461fe72 --- /dev/null +++ b/firebase.json @@ -0,0 +1,13 @@ +{ + "hosting": { + "source": ".", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "frameworksBackend": { + "region": "asia-east1" + } + } +}