How to detect pre-deploy environment?


Is there a way to detect when the code is running in a pre-deploy command versus in the “final” deploy environment?

I understand that I could set an environment variable in the pre-deploy script manually, but I’m just wondering if there is a Render-provided env var for detecting the pre-deploy environment?


I don’t think we have a dedicated environment variable at this time (I’ll make a note internally).

However, you could probably use RENDER_INSTANCE_ID. If it starts dce- that would be a pre-deploy instance.