Fetch a random post from your Ghost blog’s sitemap and publish it to your Bluesky feed on a schedule or on demand.
- Reads all post URLs from your Ghost sitemap (
sitemap-posts.xml
) - Picks one at random each run
- Authenticates and posts via the Bluesky AT Protocol client
- Fully configurable via Action inputs
Create a folder .github/actions/post-ghost
and put both:
- action.yaml
scripts/post_random_ghost.py
(from earlier)
Go to Settings → Secrets and add:
BSKY_HANDLE
– your Bluesky usernameBSKY_PASSWORD
– your Bluesky password
name: 🥝 Post Random Ghost Blog to Bluesky
on:
schedule:
- cron: '0 16 * * *' # every day at 16:00 UTC
workflow_dispatch: # allow manual trigger
jobs:
post:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Post random blog link
uses: ./.github/actions/post-ghost
with:
handle: ${{ secrets.BSKY_HANDLE }}
password: ${{ secrets.BSKY_PASSWORD }}
sitemap-url: https://www.gojiberries.io/sitemap-posts.xml
Name | Description | Required | Default |
---|---|---|---|
handle |
Your Bluesky handle (username) | ✅ | |
password |
Your Bluesky password | ✅ | |
sitemap-url |
Full URL to your Ghost blog’s sitemap-posts.xml |
✅ | https://yourblog.com/sitemap-posts.xml |
- Fetch the sitemap (XML) and extract all URLs
- Choose one at random
- Login to Bluesky via atproto-client
- Post a status like