-
|
Hi! I’m having some difficulty deploying to firebase hosting with GitHub Actions. It’s my first time using Actions, but I’ve used similar CI/CD tools in the past. The deployment fails on the final action “Connect and Deploy”:
Output:
The response indicates an invalid token, but I can run the exact same command on my local machine without trouble. Perhaps I’m not setting (or passing) the value of Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Update If I hardcode the value of $FIREBASE_TOKEN into args the deployment works flawlessly. Still doesn’t work if I swap in $FIREBASE_TOKEN. |
Beta Was this translation helpful? Give feedback.
-
|
Hello, This is a problem with parameter expansion. The This is probably more easily shown with some examples. First we tell docker to executed Confusingly I have to escape So to put this to work in Actions, this is what we need to do: So here’s what I think your action should look like: |
Beta Was this translation helpful? Give feedback.
-
|
Thank you, @hfaulds!! That did the trick. |
Beta Was this translation helpful? Give feedback.


Hello,
This is a problem with parameter expansion. The
firebasecommand doesn’t expand the parameters, the easiest way to fix this is to wrap your execution in a shell, which will expand paramters.This is probably more easily shown with some examples. First we tell docker to executed
echo $FOOand then we tell it to executesh -c "echo $FOO":Confusingly I have to escape
$FOOin these examples otherwise my terminal will expand the parameter before it’s passed to docker: