Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to use ng deploy with CI systems like Github Actions #2957

Unanswered
OmarioHassan asked this question in Q&A
Discussion options

I'm trying to use ng deploy with token but I can't
Any help

You must be logged in to vote

Replies: 3 comments 10 replies

Comment options

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.

You must be logged in to vote
6 replies
Comment options

Comment options

It needs to be an environment variable, not passed as an option.

Comment options

So how to connect GitHub secret variable with local environment variable
Is there a code example

Comment options

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

Comment options

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 }}
Comment options

@jamesdaniels after fixing the token issue, I faced a new one

image

although it works well when try ng deploy locally

image

You must be logged in to vote
4 replies
Comment options

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.

Comment options

Here are logs and no errors for ng deploy --preview

image

and this is for the browser logs

image

Comment options

dist output looks well

image

Comment options

@jamesdaniels any help 😊

Comment options

@jamesdaniels Any Support?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /