So I am having my Vue-CLI project and I can't manage automatic deployments.
I've been googling all day, I got the key from firebase login:ci
but I don't understand where am I supposed to place it inside of a yaml
files.
I did add the FIREBASE_TOKEN as an environment variable to my github repo, but the problem persists. Even if firebase docs said Option 1: Store the token as the environment variable FIREBASE_TOKEN. Your system will automatically use the token.
Here's my YAML
file, generated by firebase-CLI.
I can clone, push, fetch, create, delete and do whatever I want with my repos. Manual deploy works just fine.
Automatic deploy (on another repo, I am using Nuxt.js there) is working just fine out of the box.
Why am I having so much troubles with Vue-CLI?.. And how to fix this?
UPD: Here's output of git ls-remote -h -t ssh://git@github.com/mattboldt/typed.js.git
and it seems there's no errors while executing this command. And now I am even more confused... I don't even know WHERE'S the problem...
I also did commit changes to another repo (Nuxt.js) and automatic deployment did work over there. I also made sure that Firebase Service accounts are 100% identical between the Nuxt.js project and Vue-CLI. And it still doesn't work.
It feels like StackOverflow is the best rubber duck ever.
So here's how I solved this issue:
firebase-hosting-merge.yml
:
REPLACED
- run: npm ci && npm run build
With following code:
- run: /usr/bin/git config --global url."https://".insteadOf ssh://
- run: npm ci
- run: npm run build
So basically replacing ssh://
with https://
And then Hallelujah!
I can't believe I spent the whole day figuring out ONE line of code...
However the issue is solved and I hope my experience will help somebody else ;)