Variable setting before deploy

Hey guys!

I’m trying to allow the user to set variables before making the deploy. That is working for users that have already made a deploy, but the configuration fields are not beeing shown to users that are making their first deploy.

Can someone help me?

This is my netlify.toml setting:

[build]
  command = "npm run build"
  publish = "dist"

[template.environment]
  ECOM_STORE_ID = "Your E-Com Plus Store ID"
  ECOM_STORE_OBJECT_ID = "Your E-Com Plus Store Object ID"
1 Like

Are people deploying using a “Deploy to Netlify” button in the repo or doing a “normal” deployment?

For a “normal” deployment, one solution would be to include those variables by adding them to netlify.toml before deploying.

If they are deploying via the web UI, in step three ( Build options, and deploy!) click “Show advanced” and then “New variable”. This will allow the environment variable to be added there and used for the initial deploy.

If there are other questions or this is needed in a “Deploy to Netlify” button, please reply here anytime. :slight_smile: