From 29a217f892512046307904030c278ccc947f550b Mon Sep 17 00:00:00 2001 From: mhoennig Date: Thu, 3 Sep 2026 17:26:15 +0200 Subject: [PATCH] =?UTF-8?q?chore(repo):=20Umzug=20nach=20Gitea=20=E2=80=94?= =?UTF-8?q?=20GitHub=20bleibt=20Klon,=20main=20von=20Hand=20gespiegelt=20(?= =?UTF-8?q?D95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Zuhause ist künftig git.javagil.de/mi/werkbaum (origin); GitHub bleibt unter dem Remote `github` ein Klon, den scripts/push-github.sh mit `main` versorgt — nur vorwärts, nie erzwungen. Der Klon bleibt aus zwei gemessenen Gründen: Gitea sendet auf raw-Dateien kein Access-Control-Allow-Origin (nachgemessen an mi/werkdock), die ?sourceUrl=-Beispiellinks der READMEs müssen also auf raw.githubusercontent.com zeigen; und der Pages-Workflow lässt sich nicht mitnehmen. Footer, llms.txt und llms.md zeigen jetzt auf Gitea (Repo-Seite ohne Anmeldung lesbar, HTTP 200 geprüft); beide COMMIT_URL-Stellen (deploy-prod.sh und der Pages-Workflow) ziehen mit. deploy-prod.sh prüft origin und github getrennt und erinnert an das Spiegeln, statt selbst zu pushen. Co-Authored-By: Claude Opus 5 --- .github/workflows/pages.yml | 2 +- .werkator.yml | 10 ++-- README.de.md | 23 +++++++- README.md | 23 +++++++- docs/CHANGELOG.md | 5 ++ docs/DECISIONS.md | 55 +++++++++++++++++++ docs/examples/werkbaum.werkbaum | 13 +++++ frontend/index.html | 2 +- frontend/public/llms.md | 2 +- frontend/public/llms.txt | 6 +- scripts/deploy-prod.sh | 21 +++++-- scripts/push-github.sh | 97 +++++++++++++++++++++++++++++++++ 12 files changed, 236 insertions(+), 23 deletions(-) create mode 100755 scripts/push-github.sh diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 4cd5827..cec8927 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -76,7 +76,7 @@ jobs: [ -z "$BASE" ] && BASE="$(git rev-list --max-parents=0 HEAD | tail -1)" MICRO="$(git rev-list --count "${BASE}..HEAD")" # Commits seit dem Bump BUILD_VERSION="${MAJORMINOR}.${MICRO}" - COMMIT_URL="https://github.com/mhoennig/werkbaum/commit/$(git rev-parse HEAD)" + COMMIT_URL="https://git.javagil.de/mi/werkbaum/commit/$(git rev-parse HEAD)" echo "Footer-Version: ${BUILD_VERSION} -> ${COMMIT_URL}" mkdir -p site sed -e 's#\.\./LICENSE#LICENSE#g' \ diff --git a/.werkator.yml b/.werkator.yml index 50d8f63..2b597dd 100644 --- a/.werkator.yml +++ b/.werkator.yml @@ -4,12 +4,12 @@ werkator: version: since: "1.0.1" -# Commit status target. Points at GitHub for now; the repository will move to -# https://git.javagil.de (Gitea) later, GitHub stays a synchronised clone. Status -# checks are posted only once the origin is a Gitea; until then this is a label. +# Commit status target. The repository lives on Gitea since D95; GitHub stays a +# clone that `scripts/push-github.sh` feeds by hand. Status checks are posted +# only once the instance holds a Gitea token; until then this is a label. gitea: - baseUrl: https://github.com - owner: mhoennig + baseUrl: https://git.javagil.de + owner: mi repo: werkbaum statusContext: werkator diff --git a/README.de.md b/README.de.md index 3cf7d6c..236f3a3 100644 --- a/README.de.md +++ b/README.de.md @@ -142,6 +142,22 @@ Das Backend einrichten: siehe [backend/README.md](backend/README.md) und > `?etherpad=`-Link zeigt heute einen Hinweis hierher, statt still nichts zu > tun; siehe `docs/DECISIONS.md` D78. +### Wo der Code liegt + +Das Repository liegt auf **** (Gitea) — das +ist `origin`, und dort gehören die Branches hin: + +```bash +git clone mih09-git@git.javagil.de:mi/werkbaum.git # oder https://git.javagil.de/mi/werkbaum.git +``` + +**GitHub bleibt ein Klon.** `main` wird dorthin von Hand gespiegelt +(`scripts/push-github.sh`), denn zwei Dinge hängen daran: die +GitHub-Pages-Instanz (der 🚧 *latest build* ganz oben) und die Beispiel-Links +weiter oben, die ihre Pläne per `?sourceUrl=` von `raw.githubusercontent.com` +laden. Gitea liefert `raw`-Dateien **ohne** `Access-Control-Allow-Origin` aus — +dort blockte der Browser sie (`docs/DECISIONS.md` D23, D95). + ### Lokal ausführen Die Editor-Quelle liegt jetzt als ES-Module unter `frontend/src/`, gebündelt mit @@ -228,7 +244,8 @@ anderen Domain läge das Web-Verzeichnis in `…/subs-ssl//`.) Der Editor wird per GitHub Actions als statische Seite auf **GitHub Pages** veröffentlicht (Workflow: `.github/workflows/pages.yml`). Ausgelöst bei jedem -Push auf `main` sowie manuell (`workflow_dispatch`). +Push auf `main` **des Klons** — also nachdem `scripts/push-github.sh` gespiegelt +hat (D95) — sowie manuell (`workflow_dispatch`). Der Workflow richtet Node ein, führt `npm ci`, `npm test` (Vitest) und `npm run build` (Vite) aus und veröffentlicht die gebündelte @@ -244,8 +261,8 @@ gepflegt), die **Micro-Stelle** aus der Zahl der Commits seit diesem letzten Bump — sie steigt also mit jedem Commit und beginnt nach einem Bump wieder bei `0` (`Werkbaum 1.0.0`, `1.0.1`, … dann `VERSION` auf `1.1` bumpen → `1.1.0`). Es wird nichts ins Repo zurückgeschrieben. Im Footer verlinkt der Name **Werkbaum** -die Repo-Startseite, die **Versionsnummer** genau den zugehörigen Commit -(`…/commit/`). Lokal geöffnet zeigt der Editor den Platzhalter aus dem +die Repo-Startseite auf Gitea, die **Versionsnummer** genau den zugehörigen +Commit dort (`…/commit/`) — der Klon trägt dieselben SHAs. Lokal geöffnet zeigt der Editor den Platzhalter aus dem Quelltext (`Werkbaum 1.0`). **Einmalige Einrichtung:** In den Repo-Settings unter **Pages** als **Source** diff --git a/README.md b/README.md index f52f376..070b8ff 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,22 @@ Setting up the backend: see [backend/README.md](backend/README.md) and > old `?etherpad=` link now shows a note pointing here rather than silently > doing nothing; see `docs/DECISIONS.md` D78. +### Where the code lives + +The repository is at **** (Gitea) — that is +`origin`, and that is where branches belong: + +```bash +git clone mih09-git@git.javagil.de:mi/werkbaum.git # or https://git.javagil.de/mi/werkbaum.git +``` + +**GitHub stays a clone.** `main` is mirrored there by hand +(`scripts/push-github.sh`), because two things hang off it: the GitHub Pages +instance (the 🚧 *latest build* linked at the top) and the example links above, +which load plan files from `raw.githubusercontent.com` via `?sourceUrl=`. Gitea +serves raw files **without** an `Access-Control-Allow-Origin` header, so the +browser would block them there (`docs/DECISIONS.md` D23, D95). + ### Running it locally The editor source now lives as ES modules under `frontend/src/`, bundled by @@ -225,7 +241,8 @@ directory would be `…/subs-ssl//`.) The editor is published as a static page on **GitHub Pages** via GitHub Actions (workflow: `.github/workflows/pages.yml`). Triggered on every push to -`main` and manually (`workflow_dispatch`). +`main` **of the clone** — that is, after `scripts/push-github.sh` has mirrored it +(D95) — and manually (`workflow_dispatch`). The workflow sets up Node, runs `npm ci`, `npm test` (Vitest) and `npm run build` (Vite), then publishes the bundled `frontend/dist/index.html` as `index.html` at @@ -240,8 +257,8 @@ commit"), and the **micro** part is the number of commits since that last bump so it grows with every commit and resets to `0` right after a bump (`Werkbaum 1.0.0`, `1.0.1`, … then bump `VERSION` to `1.1` → `1.1.0`). Nothing is written back to the repo. In the footer the name **Werkbaum** links to the -repository, while the **version number** links to that exact commit -(`…/commit/`). Opened locally, the editor shows the source placeholder +repository on Gitea, while the **version number** links to that exact commit +there (`…/commit/`) — the clone carries the same SHAs. Opened locally, the editor shows the source placeholder (`Werkbaum 1.0`). **One-time setup:** In the repo settings under **Pages**, select **Source** = diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ec109a5..e616170 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,6 +17,11 @@ the git history of `docs/examples/werkbaum.werkbaum`. A day can therefore carry a link without having a note (someone forgot to write one) — but never the reverse. +## 2026-09-03 + +- The project moved to its own Gitea at git.javagil.de — the footer's repository and version links point there now, and GitHub stays a clone carrying the very same commits +- Every push is built by Werkator, the project's own CI, alongside the GitHub Pages build: backend and frontend as two named builds + ## 2026-09-02 - Running the installed app and a browser tab side by side works now: text, names and earlier states live under their own storage key per document and deleting leaves a tombstone, so windows stop deleting each other's work diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index 6638367..5d7f46d 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -9089,3 +9089,58 @@ die Browser-Fläche war verborgen, getippt wurde per `value` + `input` D91-Nachtrag 9), und der Live-Feed ruht im dauerhaft verborgenen Automatisierungs-Tab (D76-Nachtrag 1) — dass B A's Zeile sieht, ist deshalb über die Antwort auf den eigenen PATCH gemessen, nicht über den Feed. + +## D95 — Das Repo zieht nach Gitea; GitHub bleibt ein Klon, von Hand gespiegelt (2026-09-03) +Werkbaum lag auf GitHub. Seit Werkator (die eigene CI, https://werkator.javagil.de) +die Builds fährt und `werkdock` bereits auf `git.javagil.de` liegt, gehört auch +Werkbaum dorthin: **`origin` ist jetzt `mi/werkbaum` auf Gitea**, GitHub bleibt +als **Klon** unter dem Remote `github` stehen. + +**Der Klon ist kein Andenken, sondern zwei gemessene Zwänge:** + +- **CORS.** Die Beispiel-Links beider READMEs laden ihre Pläne per + `?sourceUrl=` (D23) — und das geht nur, wenn die Quelle + `Access-Control-Allow-Origin` sendet. Nachgemessen an + `https://git.javagil.de/mi/werkdock/raw/branch/main/README.md` (mit + `Origin:`-Header): HTTP 200, `Access-Control-Expose-Headers`, aber **kein + `Access-Control-Allow-Origin`**. Ein Beispiel-Link auf Gitea liefe also + genau in den Fehler, den D23 als häufigsten benennt. `raw.githubusercontent.com` + sendet ihn (D24) — die Beispiel-Links bleiben deshalb dort. +- **GitHub Pages.** Die „latest build“-Instanz (D16) ist ein + Actions-Workflow und lässt sich nicht mitnehmen. Sie bleibt, und sie baut, + sobald `main` auf dem Klon ankommt. + +**Gespiegelt wird von Hand, und nur `main`** (`scripts/push-github.sh`). +Feature-Branches und Tags bleiben in Gitea; was auf GitHub steht, ist der +veröffentlichte Stand. Erwogen und verworfen: **ein `origin` mit zwei +Push-URLs** (spiegelt bei jedem Push, auch bei Zwischenständen, und ein +Fehler an einer der beiden Seiten bricht den Push) und der **Voll-Mirror** +(`--mirror` löscht auf GitHub Branches, die in Gitea verschwunden sind — bei +einem öffentlichen Klon die unhöflichste Variante). + +**Der Deploy spiegelt nicht, er erinnert.** `scripts/deploy-prod.sh` prüft +jetzt zweierlei getrennt: ob HEAD auf **origin (Gitea)** liegt — daran hängt +der Footer-Versionslink — und ob er auf **github** liegt; fehlt das zweite, +nennt es den Skript-Namen. Ausdrücklich so entschieden (Multiple-Choice): Ein +Deploy, der nebenbei woanders hin pusht, tut mehr, als sein Name sagt. + +**Nie erzwungen.** Liegt `github/main` nicht in der Historie von `main`, +bricht das Spiegel-Script ab und zeigt `git log main..github/main`. Ein +Force-Push auf einen Klon, den andere geklont haben, ist eine bewusste +Handlung und keine Zeile in einem Hilfsskript. + +**Die Links im Produkt zeigen auf Gitea** — Footer-Repo-Link und +Footer-Versionslink (`…/commit/`, D16), `llms.txt` und `llms.md` (D43). +Voraussetzung geprüft: Die Gitea-Instanz liefert Repo-Seite und API **ohne +Anmeldung** (HTTP 200). Die SHAs sind auf beiden Seiten dieselben, der Link +bleibt also auch für jemanden auflösbar, der vom Klon kommt. Beide +`COMMIT_URL`-Stellen ziehen mit — `deploy-prod.sh` **und** der +Pages-Workflow; das ist dieselbe Doppelpflege, die D16 schon für die +`sed`-Regeln benannt hat. + +**Werkator:** Die `gitea:`-Sektion der `.werkator.yml` nennt jetzt +`git.javagil.de` / `mi` / `werkbaum` statt der GitHub-Platzhalter, und der +beobachtete Klon `~/werkbaum` auf mih09 bekommt Gitea als `origin` — sonst +sähe der Watcher neue Commits erst nach dem Spiegeln. **Status-Checks werden +weiterhin nicht gepostet**, solange auf der Instanz kein Gitea-Token liegt; +die Sektion ist bis dahin eine Beschriftung. diff --git a/docs/examples/werkbaum.werkbaum b/docs/examples/werkbaum.werkbaum index fcbfb93..2295eb8 100644 --- a/docs/examples/werkbaum.werkbaum +++ b/docs/examples/werkbaum.werkbaum @@ -124,6 +124,8 @@ - [^] #bld.backend.proxy: Apache passes /api/ on, in .htaccess (XS) %% measured: the P flag is allowed - [^] #bld.backend.remote: One command for everything on the server (S) %% remote - [^] #bld.backend.backup: Save the database, and prove it can be read back (XS) + - [x] #bld.werkator: Also built by Werkator, the project's own CI (S) %% .werkator.yml, backend + frontend + - [x] #bld.gitea: The repository lives on Gitea, GitHub stays a clone (S) - [-] #bld.ghpages: Deploy through a gh-pages branch (S) %% GitHub Actions instead - [-] #bld.gfonts: Fonts from Google (XS) %% self-hosted, no third-party request - [ ] #be: Backend (XL) @@ -853,6 +855,17 @@ taken while the service runs can be torn. Stop, fetch, start again — and read the archive back before trusting it. +#bld.werkator + Werkator, the project's own declarative CI, builds every push from a + committed .werkator.yml — backend and frontend as two named builds. It builds + and tests only; deploying stays with the scripts. + +#bld.gitea + The repository moved to Gitea; GitHub stays a clone that carries the + published main. The clone is not sentiment: the Pages instance hangs off it, + and so do the example links, which need a raw endpoint that sends CORS + headers. + #bld.ghpages Rejected: the official Actions route needs no extra branch and no deploy key. diff --git a/frontend/index.html b/frontend/index.html index 68c1b1f..6574932 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -297,7 +297,7 @@ - +