DEV Community 👩‍💻👨‍💻

Josh Kasuboski
Josh Kasuboski

Posted on • Originally published at joshkasuboski.com on

Getting Push Notifications for Everything with Pushover

I wanted to know when my personal site was deployed and decided to get push notifications.

I make changes to my site locally and then push to GitHub so it is automatically deployed using GitHub Pages. I went over that in Deploying this site with GitHub Actions. After I pushed though, I would often have to keep checking to see when it should be available. Now I get notified.

Setting up Pushover

In order to get push notifications from multiple apps, I signed up for Pushover. This lets me install just the Pushover app and all notifications will come through there.

I signed up for an account and downloaded the app. I was immediately able to manually send notifications. My original intention was to set this up for GitHub Actions though.

I created a Pushover app to get an API Token. Using this token and your user key, you can send notifications with an API call.

Adding to GitHub Actions

To get the status of my personal-site workflow, I just need to curl the endpoint with my token and user key.

I added both to my repo secrets and then could add the below step at the end of my workflow.

- name: Notify
  if: always()
  uses: wei/curl@v1
  with:
    args: -X POST -F 'token=${{ secrets.PUSHOVER_TOKEN }}' -F 'user=${{ secrets.PUSHOVER_USER }}' -F 'message=Personal Site Pipeline ${{ job.status }}' https://api.pushover.net/1/messages.json

And more

Pushover has a number of integrations. I have it setup to send me UptimeRobot alerts and also use it for Radarr. UptimeRobot just required me to add my user key and I immediately got a test message.

No longer will I be checking the status of anything 😉.

Top comments (0)

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.