Skip to content

Commit 057bb31

Browse files
authored
Update deploy-preview.yml
1 parent 96c8903 commit 057bb31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/deploy-preview.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,15 @@ jobs:
146146

147147
# 2. ADDED AUTHENTICATION STEP
148148
- name: Authenticate to Google Cloud
149+
id: auth
149150
uses: google-github-actions/auth@v2
150151
with:
151152
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
152153
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}
153154

155+
- name: Export Google Cloud Credentials
156+
run: echo "GCP_SA_KEY=$(cat ${{ steps.auth.outputs.credentials_file_path }})" >> $GITHUB_ENV
157+
154158
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
155159
with:
156160
name: build
@@ -164,6 +168,7 @@ jobs:
164168
uses: FirebaseExtended/action-hosting-deploy@e2eda2e106cfa35cdbcf4ac9ddaf6c4756df2c8c # v0.10.0
165169
with:
166170
repoToken: "${{ secrets.GITHUB_TOKEN }}"
171+
firebaseServiceAccount: "${{ env.GCP_SA_KEY }}"
167172
projectId: pandev
168173
expires: 30d
169174
channelId: "pr${{ github.event.number }}"

0 commit comments

Comments
 (0)