@@ -85,15 +85,41 @@ jobs:
8585 BLUESKY_APP_PASSWORD : ${{ secrets.BLUESKY_APP_PASSWORD }}
8686 run : ./target/release/server publish-bluesky --dir notes
8787
88- - name : Commit bsky_url updates
88+ - name : Init standard.site publication
89+ # No-op when `publications.toml` already has `at_uri` + `at_cid`
90+ # cached (see `init_publication` in `standard_site.rs`). First run
91+ # after merge creates the publication record on the PDS and writes
92+ # the URI/CID back; later runs short-circuit without touching the
93+ # network. Failure here is fatal — sync depends on it.
94+ #
95+ # `APP_BASE_URL` + `IMGPROXY_URL` are required so init can fetch the
96+ # publication's branded OG card (rasterized PNG) and upload it as the
97+ # publication cover blob. This depends on the Fly Deploy that
98+ # preceded this workflow having the `/og/publication/{key}.svg`
99+ # route live — the `workflow_run` chain enforces that ordering.
100+ id : init_standard
101+ env :
102+ BLUESKY_IDENTIFIER : ${{ secrets.BLUESKY_IDENTIFIER }}
103+ BLUESKY_APP_PASSWORD : ${{ secrets.BLUESKY_APP_PASSWORD }}
104+ IMGPROXY_URL : ${{ secrets.IMGPROXY_URL }}
105+ run : ./target/release/server publish-standard-site init blog
106+
107+ - name : Sync standard.site
108+ id : sync_standard
109+ env :
110+ BLUESKY_IDENTIFIER : ${{ secrets.BLUESKY_IDENTIFIER }}
111+ BLUESKY_APP_PASSWORD : ${{ secrets.BLUESKY_APP_PASSWORD }}
112+ run : ./target/release/server publish-standard-site sync --key blog
113+
114+ - name : Commit syndication updates
89115 run : |
90116 git config user.name "${{ steps.app-token.outputs.app-slug }}[bot]"
91117 git config user.email "${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com"
92- git add notes/
118+ git add notes/ blog/ publications.toml
93119 if git diff --staged --quiet; then
94120 echo "No changes to commit"
95121 else
96- git commit -m "Add bsky_url to published notes "
122+ git commit -m "Sync syndication state "
97123 # Rebase onto whatever main looks like *now* — covers the case
98124 # where main moved during this workflow run.
99125 git pull --rebase origin main
@@ -103,7 +129,7 @@ jobs:
103129 - name : Surface publish failures
104130 # Marks the run red so failures are visible. Runs last so partial
105131 # successes still got committed/pushed/deployed via the steps above.
106- if : steps.publish.outcome == 'failure'
132+ if : steps.publish.outcome == 'failure' || steps.sync_standard.outcome == 'failure'
107133 run : |
108- echo "::error::One or more notes failed to publish . See the 'Publish to Bluesky' step . Next run will retry."
134+ echo "::error::One or more publishes failed. See logs . Next run will retry."
109135 exit 1
0 commit comments