ci: publish the site by bumping kvartsi's content pin #1
Loading…
Reference in a new issue
No description provided.
Delete branch "forgejo-actions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This vault is the content submodule of oap/kvartsi, which builds ოუენი.გე. Until now that pin only moved when someone moved it by hand — so the deployed site drifted behind the vault by however long it had been since the last manual bump and rsync. Currently since June.
.forgejo/workflows/publish.yamlmoves it from CI instead. Writing kvartsi's gitlink to the pushed SHA is both the record of what is live and the trigger for kvartsi's deploy job, so there is no second dispatch mechanism to keep working.Why pin rather than track the tip
Letting kvartsi track
mainwould be simpler, but the pin makes kvartsi's history say exactly which vault revision produced each deploy — which is what makes a bad build bisectable and rollback-able.Why it retries
concurrencyis not enough on its own. Forgejo documents it as best-effort and cancels asynchronously, so twopublishruns can reachgit pushfrom the same base. The loser is rejected as a non-fast-forward — and if the loser carries the newer content, the site ends up pinned to the older vault revision with only a red job to show for it. Reproduced locally before writing the retry.So the push re-fetches and replays on rejection, and refuses to move the pin to a commit the current pin already descends from. Back-to-back pushes converge on the newest in either arrival order. The same retry covers the other writer to
v5— you, pushing to kvartsi by hand.Depends on
KVARTSI_TOKENon this repo, provisioned by nas (nix-configforgejo-actions-secrets). The per-job token Forgejo injects is scoped to this repo and its pushes deliberately do not trigger workflows, so it cannot be used here.deployworkflow, and thenixrunner.Nothing happens until those land; merging this early is harmless.
@ -0,0 +77,4 @@# 40-character pointer.git update-index --cacheinfo "160000,$SHA,content"git -c user.name="forgejo-actions" \-c user.email="actions@git.owenap.com" \Let's use "owen+forgejo-actions@owenap.com" instead.
Done in
c5720ad—owen+forgejo-actions@owenap.com. Added a note on why: Forgejo maps commits to accounts by author email, so the oldactions@git.owenap.comwould have shown every pin bump as an unrecognised author.c5720adedcto5b1af0a10e