It takes a moment to build my website when I push the updates to GitHub. The changes are picked up, the site is built and its deployed to Netlify. Usually when I publish a blog post by merging GitHub PR, I want to add it to my notes and share on various platforms.
I got bored at refreshing my website multiple times to see if the deploy finished so I finally asked around in my local developer community for advice on how to turn these into notifications.
ntfy.sh is a service where you can receive POST requests and turn them into notifications through their website or mobile apps.
- Create an account at ntfy.sh
- Subscribe to a new feed and give it a name. Using random generated gibberish is good because with the free tier, all feeds are public.
- Then, head over to https://app.netlify.com/sites/, navigate to Site Configuration → Notifications → Emails and webhooks
- Add a new notification and select HTTP POST request
- For Event to listen for, select Deploy succeeded and for URL to notify, add https://ntfy.io/[your-key-from-step-2].
- Now, you’ll get notification when you’re logged in to the ntfy site
- Optionally, install mobile app and subscribe to the same feed for mobile notifications.