Closed murtyjones closed 2 years ago
I think the easiest way to use environment variables in this scenario is to create your secrets in your CICD pipeline, in my case I'm using github actions so you need to reference the secrets and export them as env variables in order to access at build time in nextjs
and in your serverless.yml file you need to reference those variables like this:
Closing. comment above is proper way to handle environment variables.
Thanks for this awesome guide!
Any idea how to inject environment variables with this type of a serverless setup? I'm finding it to be surprisingly hard without checking the variables into the repo.