Before we can make our first deployment, we need to make sure to configure our secret environment variables. If you’ll recall, we have explicitly not stored these in our code (or in Git). This means that if somebody else on our team needs to deploy, we’ll need to pass the information around. Instead we’ll configure Seed to deploy with our secrets for us.

We are also going to configure Seed to deploy our app to production when we push any changes to the main branch.

By default, Seed sets you up with two environments, dev and prod. Where pushing to the main branch would deploy to dev. And you’ll need to promote your changes to prod. To keep things simple, we are only going to use the prod stage here and deploy directly to it.

To configure the above, click dev in your app Settings.

Select dev stage in Settings

Here turn off the Auto-deploy setting.

Turn off auto-deploy for dev

Then head over to the prod stage in your app Settings.

Select prod stage in Settings

Here turn on the Auto-deploy setting.

Turn on auto-deploy for prod

You’ll be prompted to select a branch. Select main and click Enable.

Select branch to auto-deploy to prod

Next, scroll down and click Show Env Variables.

Show prod env variables settings

And type in STRIPE_SECRET_KEY as the Key.

Hit Add to save your secret key.

Add secret prod environment variable

Next, we’ll trigger our first deployment on Seed.