Custom webhook
If our integrations with the most popular CI systems don't fit your use case, you can always fall back to custom webhooks.
With custom webhooks, every time an editor requests a new publication of the website with the Publish changes button, a POST request will be performed to a custom endpoint you are in charge of specifying in the settings. The endpoint must respond with a 200 status code, and react by producing a new publication of the website.
Notifying DatoCMS about the result
Once you complete the publication process, you need to let DatoCMS know how it went, so we can in turn notify the editor. To do this, you need to make a POST request to a specific endpoint with a different JSON body depending on whether the publication was completed with success or it failed.
# Successful build notification examplecurl -n -X POST https://webhooks.datocms.com/XXXXXXXXXXXXXXXXXXXX/deploy-results -H 'Content-Type: application/json' -d '{ "status": "success" }'
# Failed build notification examplecurl -n -X POST https://webhooks.datocms.com/XXXXXXXXXXXXXXXXXXXX/deploy-results -H 'Content-Type: application/json' -d '{ "status": "error" }'