Add social media auto-posting for blog posts, advisories & events#4278
Open
ewels wants to merge 3 commits into
Open
Add social media auto-posting for blog posts, advisories & events#4278ewels wants to merge 3 commits into
ewels wants to merge 3 commits into
Conversation
Posts new blog posts and advisories, and upcoming events (the day before or day of), to Bluesky and Mastodon — bringing the website to parity with the pipeline release announcements. - New `/social-feed.json` endpoint, built from the Astro content collections (single source of truth, no frontmatter re-parsing). - `bin/social-post.js` posts to both networks. Bluesky posts get a proper link-preview card (title, subtitle, header image) via an external embed, which the old RSS feedbot could not produce. Includes the subtitle in the post text. - Hourly scheduled workflow; per-network dedup log kept on a dedicated `social-bot-state` branch so it never triggers a production rebuild. - Replaces the blog-only Bluesky feedbot, which is now superseded. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for nf-core-main-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Switch the post-tracking state from a committed `social-bot-state` branch to the S3-backed Actions cache (RunsOn magic cache). Each run restores the most recent log via the `social-posts-` key prefix and saves an updated copy under a fresh, unique key — cache entries are immutable, so nothing is overwritten. This removes all repo writes from the workflow (contents: write -> read, no GITHUB_TOKEN push) and the double remote fetch. Runs on a RunsOn runner with `extras=s3-cache`; the `runs-on/action` step is a no-op on GitHub-hosted runners. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the website to parity with pipeline release announcements: automatically posts to Bluesky and Mastodon when:
This replaces the old blog-only Bluesky feedbot (
blueskyfeedbot.yml), which is now superseded.How it works
/social-feed.json— a new Astro endpoint built from the existing content collections (single source of truth; no frontmatter re-parsing or URL logic duplicated). Exposes recently published blog posts / advisories and upcoming events, with the header image for cards.bin/social-post.js— fetches that feed, decides what's due, and posts to both networks:app.bsky.embed.externalembed — the old RSS feedbot couldn't render cards over the API..github/workflows/social-post.yml— hourly cron (fast for blog/advisory, catches the event day-before window) + manual dispatch withdry_run/seedtoggles.Dedup state
The record of what's already been posted is kept in the Actions cache (S3-backed via RunsOn) rather than committed to the repo. Each run restores the most recent log via the
social-posts-key prefix and saves an updated copy under a fresh, unique key (cache entries are immutable, so nothing is overwritten). The workflow makes no repo writes (contents: read, no token push). It runs on a RunsOn runner withextras=s3-cache; theruns-on/actionstep is a no-op if ever run on a GitHub-hosted runner.Before merging / rollout
MASTODON_ACCESS_TOKENrepo secret for@nf_core@mstdn.science(Bluesky reuses the existingFEED_TO_BLUESKY). Until it's set, Mastodon is skipped and Bluesky still works.seed: true(adry_run: truepass first is recommended) so the existing back-catalogue is marked as already-posted and not blasted out.Notes
Testing
zizmor; actions are SHA-pinned.🤖 Generated with Claude Code
@netlify /social-feed.json.ts