Skip to content

Commit

Permalink
token指定をやめて、サービスアカウントの情報を読み込むように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
syou6162 committed Apr 7, 2024
1 parent 66edd0c commit 870bc63
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/deploy_firebase_hosting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() }}

0 comments on commit 870bc63

Please sign in to comment.