Skip to content

Use .nvmrc to install correct version of node before deployment to firebase #220

Use .nvmrc to install correct version of node before deployment to firebase

Use .nvmrc to install correct version of node before deployment to firebase #220

# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: "[PR] Deploy via Firebase Hosting on push to PR"
on: pull_request
jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- run: yarn install --immutable --immutable-cache
- run: yarn build
env:
CONTENTFUL_SPACE_ID: "${{ secrets.CONTENTFUL_SPACE_ID }}"
CONTENTFUL_DELIVERY_TOKEN: "${{ secrets.CONTENTFUL_DELIVERY_TOKEN }}"
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRIENDS_OF_FOXLEY_PROD }}"
projectId: friends-of-foxley-prod