App can not find the env variables
See original GitHub issueI am trying to create an .env
file as part of Github Action workflow as shown below.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: "10.x"
- name: Install npm dependencies
run: npm install
- name: Create the .env file
uses: SpicyPizza/create-envfile@v1
with:
envkey_QUERY_LIMIT: 20
envkey_GOOGLE_RECAPTCHA_SECRET_KEY: ${{ secrets.GOOGLE_RECAPTCHA_SECRET_KEY }}
file_name: .env
- name: Run build task
run: npm run build
The build job is successful but my app can not read the .env
after deployment, on the server that is.
Any ideas why?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[FIX] System Could not Find Environment Option that was ...
Method 3: Add Frequently Missing Variables in Safe Mode ; Restart your system with Safe Mode Enabled Boot using Safe Mode ; Click...
Read more >c# - .NET Core 3.1 application not finding environment variable
I cannot get my .NET Core 3.1 console application to recognize my custom system environment variables. I can pull and print other system ......
Read more >Cannot find Edit Environment Variables Window in Windows ...
Cannot find Edit Environment Variables Window in Windows 10 Home. Hi! I am new to this forum and looking for some help please!...
Read more >Introduction to environment variables - CircleCI
You can find step-by-step instructions of this process on the Environment variables page. The variable values are neither readable nor editable in the...
Read more >Create and Modify Environment Variables on Windows
Create and Modify Environment Variables on Windows · On the Windows taskbar, right-click the Windows icon and select System. · In the Settings...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue while deploying to Heroku using
akhileshns/heroku-deploy
. I figured out that if you put your.env
in.gitignore
, the file will be properly created during the workflow execution, but it will never make it to your Heroku app. You might want to use a different name for your production.env
.We have yet to conduct research into what we mean 😛
Since it’s being run in the Docker container, I’m unsure on how best to let the user be defined. Feel free to create a separate issue if this is important!
I think the items in this issue have been resolved, so I’ll close it. Feel free to re-open it if they are still a problem.