How do I auto deploy preview environments, but keep the main deployment by webhook only?

Alternatively, how can I get a preview environment deploy hook in a github action?

I’d like to deploy main only have CI check have passed, which I am doing by setting autoDeploy: false in my render.yaml and using a deploy hook in git hub actions, but this seems to have also turned off auto deploys in my preview environments.

Hi Joseph,

We currently have an open feature request around this behavior, which you can upvote to receive updates on: https://feedback.render.com/features/p/support-specifying-a-preview-environment-value-for-autodeploy

The autodeploy setting for preview environments is exposed via the REST API. One potential workaround could be to enable autodeploy for your preview environment via the API. You could do this via the initial deploy hook on the service https://render.com/docs/preview-environments#preview-environment-initialization. One potential drawback though is that changes to the render.yaml on the PR could cause this setting to be overriden.

I’ve passed your feedback along internally as well so that we can hopefully have a better native solution to this workflow in the future!

Best,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.