Report this

What is the reason for this report?

How to re-deploy an App via a build hook/web hook/deploy hook/etc ?

Posted on November 4, 2020

Is there a way to re-deploy an app via a URL?

Basically, I need a way to redeploy an app without having to log into DO’s Platform App Dashboard and clicking the Deploy button, or by making code changes to the repo attached to the app.

Similar to:



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

👋 @jesscjohnson

Currently you can trigger a deployment by making a call to our API to create a new deployment.

For example:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer b7d03a6947b217efb6f3ec3bd3504582" "https://api.digitalocean.com/v2/apps/{app_id}/deployments" 

🔗 Full API docs

Our doctl commandline tool can also be used to trigger a new deployment:

doctl apps create-deployment <app id>

🔗 AP doctl docs

Thanks for linking those documents, I will take this back to the team and see if we can plan out a feature for offering a webhook like implementation to make this easier.

Happy hacking!

Thanks @crashoverride! That’s very helpful.

Offering a web hook would be a great feature addition for folks that can’t use that API/doctl, but this way works enough for my use case.

Cheers

Triggering a deployment works fine but it re-deploys all components. Is there any option to trigger the re-deployment of a specific component?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.