Skip to content

Autopost a random (or new) Ghost blog to bsky

Notifications You must be signed in to change notification settings

gojiplus/ghostsky

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👻🦋 Post Random Ghost Blog to Bluesky

Fetch a random post from your Ghost blog’s sitemap and publish it to your Bluesky feed on a schedule or on demand.

Features

  • 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

Usage

1. Add the Action to your repo

Create a folder .github/actions/post-ghost and put both:

  • action.yaml
  • scripts/post_random_ghost.py (from earlier)

2. Configure Secrets

Go to Settings → Secrets and add:

  • BSKY_HANDLE – your Bluesky username
  • BSKY_PASSWORD – your Bluesky password

3. Example workflow

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

Inputs

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

How it works

  1. Fetch the sitemap (XML) and extract all URLs
  2. Choose one at random
  3. Login to Bluesky via atproto-client
  4. Post a status like

About

Autopost a random (or new) Ghost blog to bsky

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages