Skip to content

Add ATProto episode publishing with GitHub Actions#46

Open
Copilot wants to merge 9 commits into
mainfrom
copilot/add-standard-site-support
Open

Add ATProto episode publishing with GitHub Actions#46
Copilot wants to merge 9 commits into
mainfrom
copilot/add-standard-site-support

Conversation

Copilot AI commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Adds full ATProto integration so podcasts using this template can publish their show and episodes to the federated web via standard.site. Each episode is an individual document record.

Changes

Publishing scripts (scripts/)

  • publish-episodes.ts — Publishes episodes as standard.site documents. Supports incremental (new only, default) and --backfill (all episodes) modes. Uses cursor-based pagination to fetch all existing documents before diffing, avoiding the 100-record ATProto API limit.
  • create-publication.ts — One-time setup script to create the publication record and output the STANDARD_SITE_PUBLICATION_RKEY.

GitHub Actions

  • publish-episodes.yml — Runs after the daily "Rebuild Astro Site" workflow completes, publishing any new episodes. Also supports workflow_dispatch.
  • backfill-episodes.yml — Manual-only workflow (workflow_dispatch with confirmation input) that publishes all existing episodes.

Schema resilience

  • itunes_episodeType is optional(string()) in the Valibot schema — a missing or unexpected field won't crash unattended CI runs.

npm scripts

"publish:episodes": "tsx scripts/publish-episodes.ts",
"publish:episodes:backfill": "tsx scripts/publish-episodes.ts --backfill"

Required GitHub Actions secrets

Secret Description
ATPROTO_HANDLE Bluesky handle
ATPROTO_APP_PASSWORD App password
STANDARD_SITE_URL Podcast site URL
STANDARD_SITE_PUBLICATION_RKEY Publication record key
STANDARD_SITE_DID ATProto DID (for verification endpoint)

Documentation

  • README expanded with full setup guide, env var table, and workflow instructions.
  • CLAUDE.md updated with new environment variables.

- Install @bryanguffey/astro-standard-site package
- Add optional standardSite config to StarpodConfig type
- Configure standardSite in starpod.config.ts with placeholder values
- Create .well-known/site.standard.publication verification endpoint
@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
starpod Ready Ready Preview, Comment Jun 8, 2026 7:08pm

Request Review

@argyleink argyleink left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot here's a couple comments, tend to them or defend why it's better as is

Comment thread src/utils/config.ts Outdated
Comment on lines +34 to +35
* The publication record key from when you created your publication on ATProto.
*/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may need better instructions?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with env vars and added setup instructions in CLAUDE.md under Environment Variables — includes where to find your DID and how to get the publication rkey. Fixed in 51f2d0b.

Comment thread starpod.config.ts Outdated
Comment on lines +36 to +39
standardSite: {
did: 'did:plc:your-did-here',
publicationRkey: 'your-publication-rkey-here'
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cant this pull from config, or config pull from this? should only need written once

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to environment variables (STANDARD_SITE_DID and STANDARD_SITE_PUBLICATION_RKEY) — matching the existing DISCORD_WEBHOOK pattern. Values are set once in .env, endpoint reads directly from import.meta.env. No more placeholder config in starpod.config.ts. Fixed in 51f2d0b.

….config.ts

Moves DID and publication rkey to STANDARD_SITE_DID and
STANDARD_SITE_PUBLICATION_RKEY env vars, matching the existing pattern
(DISCORD_WEBHOOK). Removes StandardSiteConfig type and placeholder values
from starpod.config.ts — values are only written once in .env.

@argyleink argyleink left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot The move to env was good but now there's a lack of documentation to guide someone to use the feature. Where other env vars are described and explained, explain the standard ones and include a link to the standard.site for additional information. In the readme also explain what being a standard publication means and why you'd want to enable it through the config.

Also, does the site work fine without the env vars? The plugin doesn't need put into the Astro config still?

Explains what standard.site federation is, why you'd want it,
how to configure the env vars, and links to further resources.
Clarifies the feature is optional and the site works fine without it.

Copilot AI commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot The move to env was good but now there's a lack of documentation to guide someone to use the feature. Where other env vars are described and explained, explain the standard ones and include ...

Added a full "standard.site (ATProto Federation)" section to the README (9291cb1) explaining what it is, why you'd want it, a table with env var descriptions and where to find the values, and a link to the plugin docs.

To your questions: Yes, the site works fine without the env vars — the .well-known endpoint returns a 404 when they're not set. And no, the plugin doesn't need to go into astro.config.mjs — it's only used as a library import in the endpoint file, not as an Astro integration.

Copilot AI changed the title Add standard.site support via @bryanguffey/astro-standard-site Add ATProto episode publishing with GitHub Actions Jun 7, 2026
@RobbieTheWagner

Copy link
Copy Markdown
Member

@copilot This has some linting and type errors. Please fix those.

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot This has some linting and type errors. Please fix those.

Fixed in the latest commit — resolved the two type errors (string | undefined not assignable to string in both scripts), removed the unused FeedEpisode interface, and replaced the deprecated agent.api with the direct agent call. Lint and astro check both pass cleanly now.

Comment thread scripts/create-publication.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot should we not put the types on these lines instead of casting everything to string later?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the env var declarations inside main() so TypeScript properly narrows them after the guard check — no more as string casts needed. Fixed in the latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants