-
Notifications
You must be signed in to change notification settings - Fork 2.2k
How to use ng deploy with CI systems like Github Actions #2957
-
I'm trying to use ng deploy with token but I can't
Any help
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 10 replies
-
Locally run firebase login:ci
which will generate a CI token for you. Then take that token and set it as an environment variable (FIREBASE_TOKEN
) in your CI system, if available use a "secret" environment token so it's encrypted.
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
It needs to be an environment variable, not passed as an option.
Beta Was this translation helpful? Give feedback.
All reactions
-
So how to connect GitHub secret variable with local environment variable
Is there a code example
Beta Was this translation helpful? Give feedback.
All reactions
-
So how to connect GitHub secret variable with local environment variable
Is there a code example
look at the github actions docs, it's pretty explicit on how to use env variables
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
So how to connect GitHub secret variable with local environment variable Is there a code example
This is what I use:
- name: Firebase Deploy run: firebase deploy --token ${{ secrets.FIREBASE_TOKEN }}
Beta Was this translation helpful? Give feedback.
All reactions
-
@jamesdaniels after fixing the token issue, I faced a new one
although it works well when try ng deploy locally
Beta Was this translation helpful? Give feedback.
All reactions
-
You need to set that public
directory in the hosting config to whatever the directory your browser bundle is built / been moved to. Use ng deploy --preview
locally to see where those artifacts are being placed.
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
dist output looks well
Beta Was this translation helpful? Give feedback.
All reactions
-
@jamesdaniels any help 😊
Beta Was this translation helpful? Give feedback.
All reactions
-
@jamesdaniels Any Support?
Beta Was this translation helpful? Give feedback.