-
Notifications
You must be signed in to change notification settings - Fork 175
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
DOTENV cannot find .env file #36
Comments
Secrets are stored in repo Settings -> Secrets, so a secret with |
@teamzz111 are you using |
Yes |
@teamzz111 remove that from your plugins and it will work. that plugin is attempting to find an |
i use .env for TENCENT_SECRET_ID & TENCENT_SECRET_KEY, but it still need how do I distinguish between AWS and TENCENT Cloud? |
I use .env vars for databases, keys etc. I really need this file |
@teamzz111 hi, I am facing same issue in github actions. Did you find a solution for this issue? |
Remove the plugin or remove your env from gitignore. |
I have removed the plugin. Still when I deploy lambda via github actions I can not see any environment variables on aws console. How do i setup the environment variables for the lambda function. I am using this for my gihub actions |
I'm facing the same issue. |
I ended up not using the action and just installing the - run: pnpm add --global serverless
- name: 'Deploy'
run: |
#
# auth
#
serverless config credentials \
--provider aws \
--key ${{ env.AWS_ACCESS_KEY_ID }} \
--secret ${{ env.AWS_SECRET_ACCESS_KEY }}
#
# deploy
#
serverless deploy \
--config serverless.yml \
--stage ${{ env.STAGE }} \
--region ${{ env.AWS_REGION }}
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }} |
Solution is this https://github.com/marketplace/actions/setup-serverless-environment Add this to your GitHub actions file to add environment variables env: |
Link does not work? I'm facing the same problem, even after removing the plugin, it still fails to load the env vars. My deploy script:
|
Hi guys, assuming that
Serverless said: DOTENV: Could not find .env file.
Is necesary to create .env in environment of actions?
The text was updated successfully, but these errors were encountered: