Skip to content

Configure github actions to PR and main merge #11

Configure github actions to PR and main merge

Configure github actions to PR and main merge #11

# Configuration for deploy a preview of the PR to a temporary url
# The goal is to be able to test the PR before merging it
# This action is triggered on every PR, regardless of the branch
# The preview url has a lifetime of 7 days
# For more information, see https://github.com/marketplace/actions/deploy-to-firebase-hosting#options
name: Deploy to Firebase Hosting on PR
"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@v4
- run: yarn install && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_GRAPHAPP_BCA04 }}"
expires: 7d
projectId: graphapp-bca04