I have generated the workflows on my github via firebase cli. My site has an error: Uncaught FirebaseError: Installations: Missing App configuration value: "projectId" (installations/missing-app-config-values) ? However, when I do a firebase deploy on my firebase cli it does not give that error. It only has that error when it deploys from github actions. Is there any way to solve it?
Steps I have done:
- manually deployed my app using firebase deploy on the cli => The site works
- attempted deploy via github workflow => The site failed and gave an error of project Id
What I think:
- firebase deploy on cli deploys my .env but not the github workflow. My .env contains the keys of firebase services and project id. Is there a way to deploy .env during github workflow?
This is my .yml file
# 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:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROJECT_ID }}'
channelId: live
projectId: PROJECT_ID
```
The project ID is the id from my firebase project.