use CI system --token flag on ng deploy
**Angular:9.1.11
**Firebase:7.15.4
**AngularFire:6.0.2
For Ci/CD want use Ci system of firebase-tools: https://www.npmjs.com/package/firebase-tools#using-with-ci-systems
ng deploy is not possible to use --token flag
Steps to set up and reproduce
On bitbucket pipeline use --token flag `ng deploy --token= $FIREBASE_TOKEN
Expected behavior
Deploying to firebase hosting,functions
Actual behavior
get error Unknown option: '--token'
PR #2525
Hello angularFire team. I literally spend a ton of money in your app for my clients. At least answer us. It’s a shame that core features are broken. It’s a shame you don’t manage the PR. At least give us back the projets lead and we can manage it like a TRUE open source project.
work around:
npm run build:staging
npx firebase deploy --token $npm_package_config_token
configure .firebaserc to use targets
any progress on this issue?
This API is now available in 6.1
After seeing that this was resolved, I tested ng deploy --token {TOKEN} and i still get "Unknown option: '--token'" . What am I doing wrong?
I'm on @angular/fire version 6.1.4 and with ng deploy --token $ACCESS_TOKEN_FIREBASE I'm getting Cannot run login in non-interactive mode. See login:ci to generate a token for use in non-interactive environments.
I've noticed Firebase has changed the way of handling CI for SSR, now the automatically generated in package.json scripts predeploy and deploy aren't that useful. Especially with the new setup for .firebaserc for which I couldn't find any official documentation, just some StackOverflow... Mayday.
I tried to set FIREBASE_TOKEN env variable before ng deploy command in CICD, now I get below error, while the value I set in FIREBASE_TOKEN was retrieved through firebase login:ci
Cannot run login in non-interactive mode. See login:ci to generate a token for use in non-interactive environments
Update
The issue was, I ran sudo ng deploy and for some reasons, it wasn't read the firebase token from env, after removing sudo the issue is resolved
From @RezaRahmati story, I realized that within FIREBASE_TOKEN env variable, ng deploy can run well (without --token $ACCESS_TOKEN_FIREBASE)