DEV Community

Discussion on: Schedule Netlify Builds with GitHub Actions, Cron, and Webhooks

Collapse
 
michaelcurrin profile image
Michael Currin • Edited

The default for POST is to send form field data rather than JSON - so you can do -d 'foo=bar fizz=buzz.

Which means you can simplify to '' payload. Plus POST is implied.

Example here using simpler syntax and the env variable secret you mentioned

run: curl -d '' {{ NETLIFY_BUILD_HOOK }}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
chantastic profile image
chantastic

thanks!
when i generate the build hook in Netlify, it includes the whole curl command. I left it as provided to prevent confusion but you are correct, the simplified version would work all the same

Collapse
 
michaelcurrin profile image
Michael Currin

Ah ok makes sense