Skip to content

Commit

Permalink
[CI] FIX deploy preview channel (#26)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
flavioislima and flavioislima authored Feb 14, 2024
1 parent 2de6cc5 commit 224c992
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm run deploy
- uses: actions/checkout@v4
- run: yarn && yarn build && yarn export
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.ACTIONS_DEPLOY_KEY }}'
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_HEROICGAMESLAUNCHER }}'
channelId: live
projectId: heroicgameslauncher
12 changes: 4 additions & 8 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
on:
pull_request:
branches: [main]
workflow_dispatch:

'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm run deploy
- uses: actions/checkout@v4
- run: yarn && yarn build && yarn export
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.ACTIONS_DEPLOY_KEY }}'
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_HEROICGAMESLAUNCHER }}'
projectId: heroicgameslauncher

0 comments on commit 224c992

Please sign in to comment.