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:

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

  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:

We are using a “Deploy to Netlify” button, deploying via the web UI, where the users shoud insert these IDs.

If there is a way to make the enviroment variables be shown in the UI even in the first deploy we would appreciate it very much. This would be the best way for our users to make the deploy.

Thanks for the reply.

Hmm, that should work already. It does seem to with our statuskit, using the exact same format:

as shown here:


Could you link me to your repo so I can try it out myself?

Sure! :