Skip to content

Commit

Permalink
merge時にfunctionsもデプロイするように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakawaTakuya committed Nov 6, 2024
1 parent c1505a6 commit 0b3485a
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
name: Deploy to Firebase Hosting and Functions on merge
on:
push:
branches:
Expand Down Expand Up @@ -33,9 +33,28 @@ jobs:
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
REACT_APP_FIREBASE_MEASUREMENT_ID: ${{ secrets.REACT_APP_FIREBASE_MEASUREMENT_ID }}

# Firebase Hostingををデプロイ
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TODO_REAL_C28FA }}
channelId: live
projectId: todo-real-c28fa

# Cloud Functionsをデプロイ
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: functions/package-lock.json

- name: Install dependencies for functions
run: npm install -C functions

- name: Deploy to Firebase Functions
uses: w9jds/firebase-action@master
with:
args: deploy --only functions
env:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}

0 comments on commit 0b3485a

Please sign in to comment.