Skip to content

Commit 224c992

Browse files
authored
[CI] FIX deploy preview channel (#26)
* Add channelId parameter to Firebase deployment * Update Firebase service account for Heroic website deployment * Update firebase-hosting-pull-request.yml to use pull request number as channelId * Update GitHub Actions workflow for Firebase Hosting deployment --------- Co-authored-by: Flavio F Lima <flavioislima@users.noreply.github.com>
1 parent 2de6cc5 commit 224c992

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/workflows/firebase-hosting-merge.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
build_and_deploy:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- run: npm run deploy
13+
- uses: actions/checkout@v4
14+
- run: yarn && yarn build && yarn export
1515
- uses: FirebaseExtended/action-hosting-deploy@v0
1616
with:
17-
repoToken: '${{ secrets.ACTIONS_DEPLOY_KEY }}'
17+
repoToken: '${{ secrets.GITHUB_TOKEN }}'
1818
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_HEROICGAMESLAUNCHER }}'
1919
channelId: live
2020
projectId: heroicgameslauncher

.github/workflows/firebase-hosting-pull-request.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@
22
# https://github.com/firebase/firebase-tools
33

44
name: Deploy to Firebase Hosting on PR
5-
on:
6-
pull_request:
7-
branches: [main]
8-
workflow_dispatch:
9-
5+
'on': pull_request
106
jobs:
117
build_and_preview:
128
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
139
runs-on: ubuntu-latest
1410
steps:
15-
- uses: actions/checkout@v2
16-
- run: npm run deploy
11+
- uses: actions/checkout@v4
12+
- run: yarn && yarn build && yarn export
1713
- uses: FirebaseExtended/action-hosting-deploy@v0
1814
with:
19-
repoToken: '${{ secrets.ACTIONS_DEPLOY_KEY }}'
15+
repoToken: '${{ secrets.GITHUB_TOKEN }}'
2016
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_HEROICGAMESLAUNCHER }}'
2117
projectId: heroicgameslauncher

0 commit comments

Comments
 (0)