From 870bc632327032981fadae069912b2155f36841b Mon Sep 17 00:00:00 2001 From: Yasuhisa Yoshida Date: Mon, 8 Apr 2024 05:50:40 +0900 Subject: [PATCH] =?UTF-8?q?token=E6=8C=87=E5=AE=9A=E3=82=92=E3=82=84?= =?UTF-8?q?=E3=82=81=E3=81=A6=E3=80=81=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9?= =?UTF-8?q?=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88=E3=81=AE=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=82=92=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=82=80=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_firebase_hosting.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_firebase_hosting.yaml b/.github/workflows/deploy_firebase_hosting.yaml index bb7068d1..472dfc7e 100644 --- a/.github/workflows/deploy_firebase_hosting.yaml +++ b/.github/workflows/deploy_firebase_hosting.yaml @@ -6,6 +6,9 @@ on: jobs: build: + env: + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }} runs-on: ubuntu-latest steps: - name: Checkout @@ -27,7 +30,11 @@ jobs: run: npm run-script build - name: Setup Firebase CLI run: npm install -g firebase-tools + # 認証情報を保持するjsonファイルをGOOGLE_APPLICATION_CREDENTIALSで指定したpassに生成 + - name: make GOOGLE_APPLICATION_CREDENTIALS + run: echo $GCLOUD_SERVICE_KEY | base64 -d > $GOOGLE_APPLICATION_CREDENTIALS - name: Deploy Firebase - env: - FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} - run: firebase deploy --only hosting --token $FIREBASE_TOKEN + run: firebase deploy --only hosting + - name: delete GOOGLE_APPLICATION_CREDENTIALS + run: rm $GOOGLE_APPLICATION_CREDENTIALS + if: ${{ always() }}