The deploy recipe was missing a pull, and the push kept failing

`git push gitea main` is rejected as a non-fast-forward whenever anything has
been published since the last deploy, and the runbook never said so. The
translate step commits the generated German and Portuguese siblings back to
Gitea — `translate: update N generated siblings [skip-translate]` — so gitea/main
gains a commit the server's checkout does not have, every single time a post
goes live. The documented three commands then leave the public site serving the
previous build while everything looks like it worked.

So the recipe is four: pull from GitHub, pull from Gitea, deploy the board, push.
The second pull never conflicts, because nothing but the pipeline writes those
files. The order of the last two matters on a release that changes both halves:
the members area goes up first, so that anything on the static side calling it —
the bar asking /comunidad/sesion.json — finds it already there.

Also written down, because all three deploys that went wrong this week went
wrong the same way: paste one line at a time. Commas between commands made git
look for a branch whose name ended in a comma; a block pasted while ssh was
asking its host-key question was swallowed as answers to the prompt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
This commit is contained in:
Claude 2026-10-03 09:07:44 +00:00
parent c84a996eef
commit 4e82f66d08
No known key found for this signature in database

View File

@ -415,16 +415,38 @@ finds Gitea level with your local `main`, and answers *"Already up to date."*
which is true about the wrong remote, and reads exactly like there is nothing
to do.
An update is a named pull, a push to Gitea so the build pipeline sees it, and a
rebuild:
**Paste one line at a time.** Every deploy that has gone wrong here went wrong
in the terminal rather than in the code: three commands pasted on one line
separated by commas, so git looked for a branch whose name ended in a comma; and
a block pasted into a session that was still answering `ssh`'s host-key
question, which swallowed the rest as answers. One line, one Enter, read what it
says.
An update is **two** named pulls, a push to Gitea so the build pipeline sees it,
and a rebuild:
```sh
cd ~/vienalatina
git pull --no-rebase --no-edit github <the-branch-name>
git push gitea main
git pull --no-rebase --no-edit gitea main # see below — Gitea moves on its own
sudo bash scripts/deploy-board.sh
git push gitea main
```
**The second pull is the one this page used to be missing**, and the push fails
without it with a non-fast-forward rejection. The translate step of the pipeline
*commits* the generated German and Portuguese files back to Gitea
(`translate: update N generated siblings [skip-translate]`), so every time
anything is published, `gitea/main` gains a commit this checkout does not have.
A push then has nothing to fast-forward from. Pulling it first merges the
pipeline's own work into yours, which is all that is needed — there is never a
conflict, because nothing but the pipeline writes those files.
**The order of the last two lines matters when a release changes both halves.**
`deploy-board.sh` puts the members area up; the push is what rebuilds the public
site. Anything on the static side that calls the app — the members' bar asking
`/comunidad/sesion.json` — then finds it already there.
Both flags earn their place. `main` and the branch have genuinely diverged —
main carries the previous merge, the branch carries the new work — and a git
with no `pull.rebase` set refuses to guess, with *"fatal: Need to specify how to