'Env varibale for Vue Js Page for Github Action Firebase Deploy
I am facing problem of providing env variable to my vuejs page for github action deploy. I have a remote dev branch and when I push to dev branch, github actions triggers and deploy using firebase. My page uses a backend url (process.env.backend_url) which I want to pass from yml file. And I cant figure out how.
This is my yml file for dev push.
name: Deploy to Firebase Hosting on to Dev
'on':
push:
branches:
- dev
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- run: npm ci
- run: CI=false npm run build:dev
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE}}'
channelId: live
projectId: projectid
target: dev
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
