simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

How to authenticate commands in CI #134

Closed kdawgwilk closed 10 months ago

kdawgwilk commented 10 months ago

I am trying to setup deployments on merge and I created a service account that output to a file in github actions and then run the nx deploy command while setting the GOOGLE_APPLICATION_CREDENTIALS env var to the service account json file to use for auth but it fails with

Error: Failed to authenticate, have you run firebase login?
simondotm commented 10 months ago

Hi @kdawgwilk - you need to set a FIREBASE_TOKEN variable in your CI environment. More Info here 👍 https://firebase.google.com/docs/cli#cli-ci-systems

kdawgwilk commented 10 months ago

From what I have found on the Interwebs 😅 that flow is deprecated https://stackoverflow.com/questions/75653962/firebase-token-deprecated-in-ci-cd-gitlab

simondotm commented 10 months ago

ah ok thats good to know, will have to keep an 👀 on that then! so although its warning that its deprecated, it'll still work for now anyway I guess 👍