Pinging RSSCloud with a GitHub Action

Oct 9, 2024

2 min read

Scott Hanson

A lot has changed since I last wrote about RSSCloud. I now host my blog myself on Hetzner instead of using Netlify. The blog now consist of static files generated by a nuxt.js app based on bloggrify. My simple setup no longer can ping RSSCloud itself when it changes. However, since I still push updates through GitHub, I can run a GitHub action every time I push to my repository.

name: Ping RSSCloud

on:
    push:
        branches:
            - main

jobs:
    ping-rsscloud:
        runs-on: ubuntu-latest
        steps:
            - name: Ping RSSCloud
              run: |
                  curl -X POST "http://rpc.rsscloud.io:5337/ping" \
                  -d "url=https://scotthanson.de/rss.xml"

And that's all! RSSCloud sends a success message in response, but since the GitHub Action doesn't have server running, no one is listening. And, of course, this post is also to test whether the ping is working. 😃

Update It doesn't work as expected! It takes a couple of minutes to rebuild my blog after GitHub is updated, so the ping is sent before the RSS file is updated. Back to the drawing board!

Update 2 I ended up solving this a different way. I can run commands on the Hetzner server after the build is complete, so I can use curl to send the ping.

curl -X POST "http://rpc.rsscloud.io:5337/ping" -d "url=https://scotthanson.de/rss.xml"