4
If you're looking to use GitHub actions to deploy to Firebase, you can consider creating .env variables before build and deployment.
Simply set your environment variables as secrets under your GitHub repository settings and in your .github/workflows/{action}.yml, add this step
...
- name: Create env file
run: |
touch .env
echo API_ENDPOINT=${{ secrets.API_ENDPOINT }} >> .env
echo API_KEY=${{ secrets.API_KEY }} >> .env
cat .env
...
And in your codebase, just call process.env.API_KEY to use the variable!