I'm trying to set up a webhook that will trigger a github action. The github action builds and deploys my side. I've followed the instructions in these two posts:
Still getting a 404 or 422 error. I noticed that the payload comes from prismic with event type rather than event_type, is that what is causing it?
Just pulling my hair out trying to get this to work. If anyone has done it before and might no where I am going wrong, I would really appreciate the help. I'm trying to follow the steps in the two articles above but keep getting that error when I test out the webhook.
I've also just been playing with this same workflow. Unfortunately it looks like the prismic payload isn't compatible with the current Github dispatch endpoint
It's not just the mismatch between type and event_type, github also won't accept secret, and other extra fields…
This is an issue that I was tracking for around 1.5years in Prismic. I saw many requests on this topic from various users. I send the same in feedback email as well. I still don't see any solutions.
Is it something Prismic planning to do? Is there any realistic timeline?
We are tracking this in our backlog, but due to other high-priority tasks, we cannot get to it just yet. We will of course provide you with an update as soon as possible.
@Phil what about now? There are threads going back 3 years at least asking about custom bodies for webhooks — a necessary feature to trigger GitHub actions.
Thanks a lot for your suggestions for enhancements. While we don't have immediate plans to incorporate this feature, many of our users have found a viable alternative.
With the growing trend towards serverless architecture, you can achieve payload customization using a proxy function. Below is a sample code snippet that demonstrates how to accomplish this with a serverless function in Vercel.
Thanks @renaud, the sample implementation is useful — but I will say that expecting users to run, maintain, and pay for additional infrastructure just to make webhooks work with an extremely common CI provider is preeeeeeetttty lame from a product standpoint.