Reputation: 480
I'm using React for my project along with Firebase. Using Github Actions my code is successfully deployed to firebase.
But when I visit the hosted URL It gives me an error in the console saying
"Your API key is invalid, please check you have copied it correctly."
However when I deploy from the local system directly using firebase deploy
It works fine.
I have taken the required care of my environment variables. But nothing seems to work.
It seems there is some problem while GitHub actions deploy the changes to firebase.
Though all the build pass it gives me an error as stated above. Please Help.
Upvotes: 4
Views: 1658
Reputation: 11
This happen because GitHub actions don't have access to your .env
on your local machine, you need to configure that on "GitHub Secrets" and put on your yml
file.
Upvotes: 1