Skip to content
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on PR
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
timeout-minutes: 30
environment:
name: ${{ github.ref_name }}
url: ${{ steps.firebase-deploy.outputs.details_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci --prefer-offline
- run: npm run codegen
- run: npm run build
env:
VITE_COMMIT_REF: ${{ github.sha }}
VITE_CONTEXT: ${{ github.ref_name }}
- uses: FirebaseExtended/action-hosting-deploy@v0
id: firebase-deploy
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ROPESCORE_APP }}
projectId: ropescore-app