Deploy Hooks?
Platforms like Vercel provide such a feature so we can do more flexible behavior based on the deployment status, is that possible Deno Deploy could also consider providing a similar one?
Thanks.
For a Deno Deploy project that is deployed through GitHub Actions ("Build step with GitHub Actions"), I believe you should be able to add a webhook to the GitHub Action workflow.
https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
It would be useful and very developer friendly to be able to specify URLs in the deno.json that are hit after deployment.
Maybe a deploy prop, to allow future config too...
deno.json (just for example, I think the actual props need to be better thought out):
{
"deploy": {
"onSuccess": "/deployed", // resolved against the deployment URL, could also be absolute
"onFail": "mailto:[email protected]", // also support mailto: for really simple email notifications instead
// example of other potential options:
"entrypoint": "main.ts"
}
}
This avoids having to over-complicate the project with a CI specific build config, it would also work when using deployctl directly from cmdline or other CI and could potentially be adopted as a standard for all Deno hosting services, not just Deploy.