Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support process.env #225

Open
ThomasKientz opened this issue Mar 22, 2024 · 1 comment
Open

Support process.env #225

ThomasKientz opened this issue Mar 22, 2024 · 1 comment

Comments

@ThomasKientz
Copy link

To deploy to hosting with https://github.com/FirebaseExtended/action-hosting-deploy

We can use github actions secrets and variables to set env variables that will be injected into node's env variables and then consumed with process.env:

name: Deploy to Firebase Hosting

env:
  API_KEY: "${{ secrets.API_KEY }}"

jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm run build
      - uses: FirebaseExtended/action-hosting-deploy@v0          

Would it be possible to support this as well ?

Found this in the repo, it may be the solution :
https://github.com/FirebaseExtended/action-hosting-deploy/blob/120e124148ab7016bec2374e5050f15051255ba2/src/deploy.ts#L98

@ThomasKientz
Copy link
Author

Found a workaround by using in addition create-env-file action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant