No additional services deployed when enabling previews

I thought I’d have a play with preview environments and I’m running into this:

Successful deployment via YAML from master branch
Pull request previews enabled on dashboard
PR created on GH
PR preview deployment successful
Still using the same DB
Read the docs
add previewsEnabled: true to render.yaml in the new branch
Deployment successful

Actual:
No additional services deployed.

Expected:
Services deployed

Did I miss something here? Is the order of enabling previews important?

Regards,
John.

Hey John,

PR previews pre-date Preview Environments and are actually two different features. PR previews will create a copy of a single server and are enabled from the dashboard. Preview environments are enabled from your render.yaml and will create a copy of all services defined in the file. I see can how this can be confusing. I’ll see if we can prioritize making this distinction more clear.

It sounds like you are pretty close to getting this up and running. First, you will want to turn off PR previews from the dashboard to avoid creating a duplicate server. Any pull request made against a branch with previewsEnabled: true will trigger a new environment. So you will want to merge the previewsEnabled change into your main branch. Then, all future PRs made against the branch should create the preview environment as expected.

Let me know if you run into any other issues getting this working!

ahhhh…

That’s got me sorted now, thanks for clearing it up.

1 Like