Programatically publish a deploy preview

Briefly summarize the issues you have been experiencing.

This is a generic query:

  1. I create deploy previews of several variants of my site using the cli.
  2. I would like to programatically set one of those previews as the live version. (I do not want to use the cli --prod flag).
  3. This is like creating multiple pull requests from different branches and then picking one.
  4. We are unable to use the git workflow to deploy on merge to master or netlify CD.

Is there a API can I am able to use.

Please provide a link to your live site hosted on Netlify

NA

What have you tried as far as troubleshooting goes? Do you have an idea what is causing the problem?

I tried looking through the https://open-api.netlify.com specs but, being fairly new to this I would love some help.

Do you have any other information that is relevant, such as links to docs, libraries, or other resources?

NA

Nevermind, figured it out:

https://open-api.netlify.com/#/default/lockDeploy

1 Like

thanks for coming back and letting us know what you figured out!

What does lockDeploy do?

Hi there, did you give this a read through already?

ah! that’s what that means. That’s not what I want in my use case then. Thanks!