Saving or deleting in the admin now starts the publish workflow by itself, and the admin
follows the change all the way to production instead of stopping at "merged".
- Auto-publish: content saves/deletes and album saves/deletes dispatch content-bump.yml
after their commit (lib/admin/autopublish). The workflow's concurrency group already
coalesces bursts (one run going, one waiting, the waiting one reads the newest main). A
failed dispatch keeps the save and is reported ("publish": "failed"); "Xuất bản" stays
as the manual retry. Audit action publish.auto.
- Live status: the build records the content commit its src/content points at
(__CONTENT_COMMIT__, from the gitlink in HEAD); /api/health and the admin report it as
version.content. A pure publishPhase() turns content head, main's pointer, the running
build, the bump PR and the last run into live / pending / building / review / deploying /
failed, shown by the PublishBar and the dashboard (which now reads it live too).
- Fixes found while tracing the flow:
- validation now matches the content schema, so a save can't queue a red build:
chapter is a positive integer, cover and coverMedia can't both be set, album is a slug
and must already have photos;
- the tags inputs update on input, so Ctrl/⌘+S no longer saves the previous tags;
- commits in the public content repo say "via admin" without the admin's email (the
private audit log keeps who did what);
- deleting an image also checks the content the live site was built from, not only
main;
- the cover gets an alt field in the editor, and the picker takes alt text for uploads;
- one-shot stories (stories/<slug>.md) can be opened and created.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>