I have a react app (CRA) hosted on Firebase. I followed a tutorial or documentation several months ago to configure it. I’ve since forgotten all the steps I took and what resources I found.
In June 2024, GitHub deprecated Node v16 and began enforcing Node v20 for all actions.
https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Now when I push to ‘main’ I get this error and warning:
GitHub Action job
I’ve read through that article and all the linked resources. I’ve tried a few edits to firebase-hosting-merge.yml
, but I seem to always break the action worse. Any altered form of the yaml file yields just the ‘exit code 1’ error on the GitHub action, without the warning.
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_xx }}'
channelId: live
projectId: xx
I’ve tried changing actions/checkout@v3
to v4
. I’ve tried a few things to specify node20
, all without success.
I’m looking for the right way to bring this action current. Is this a simple edit to the yaml, or do I need to run firebase init
again? or firebase init hosting:github
? Thanks in advance!
zbiewend is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.