Use .nvmrc to install correct version of node before deployment to firebase #220
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |