I want to use event-triggered function to notify other service I use that a new version of my site has been deployed. The
deploy-succeeded.js I wrote is pretty simple, so I place its dependency inside
. ├── functions │ └── deploy-succeeded.js ├── netlify.toml ├── package.json ├── ...
In the deploy log, I can see entries like
Prepping functions with zip-it-and-ship-it 0.3.1 and
1 new functions to upload. My site is now deployed, and “deploy-succeeded.js” can be seen in the “Functions” panel of my site. However, its function log is empty with only a spinning cursor. The remote service didn’t receive any request, either.
That function can be triggered locally after
netlify dev with
curl http://127.0.0.1:34567/.netlify/functions/deploy-succeeded, which can be confirmed by logs in terminal generated by console.log().
Would love to know if I made any mistake in configuring Netlify functions, and how can I debug these event-triggered ones.