Skip to content

Update github actions to properly install pnpm before build #17

Update github actions to properly install pnpm before build

Update github actions to properly install pnpm before build #17

# 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
steps:
- uses: actions/checkout@v4
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
run: pnpm i --frozen-lockfile
working-directory: ./frontend
- name: Create .env file
run: |
echo "${{ secrets.ENV_FILE }}" > ./.env
working-directory: ./frontend
- name: Build
run: pnpm build
working-directory: ./frontend
- name: Copy firebase config
run: cp ./frontend/firebase.json ./firebase.json && cp ./frontend/firestore.indexes.json ./firestore.indexes.json && cp ./frontend/firestore.rules ./firestore.rules && cp ./frontend/.firebaserc ./.firebaserc
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_RESEARCH_QUERY }}'
projectId: research-query
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks