Build legal manifest / build-manifest (push) Successful in 22s
Az ÁSZF saját 3.2. pontja "megismerhető, megjeleníthető és letölthető" szöveget kér — ezt egy önálló (külső CSS/JS-függőség nélküli) HTML oldal is teljesíti (böngészőből menthető/nyomtatható), külön PDF-render nélkül. Ez NEM ugyanaz, mint a HRF-33/34 ajánlat-szerződés PDF-je — az egy ténylegesen elfogadott, hash-elt clickwrap-példány, más indokkal; azt nem érinti ez a változás. Egyszerűsödött CI-környezet: WeasyPrint + natív libek (pango/cairo) törölve, csak pandoc + python3 kell. A manifest "pdf" mezője megszűnt. A rendereletHTML immár kicsi (nincs PDF), ezért a teljes dist/ kimenet visszacommitolódik "manifest/" néven (nem csak a JSON) — a fogyasztók ugyanazzal a git clone-nal a HTML-t is megkapják, nem csak a metaadatot.
54 lines
2.4 KiB
YAML
54 lines
2.4 KiB
YAML
name: Build legal manifest
|
|
|
|
# HT-14: renders every project's legal markdown to HTML and produces
|
|
# dist/legal-manifest.json — the single canonical source HT-15's consumer backends import,
|
|
# so no one hashes/versions independently. See scripts/build-manifest.py for the actual
|
|
# logic (and why there's no PDF step); this workflow just provides the environment it needs.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore: [manifest/**] # avoid the commit-back step (below) re-triggering itself
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
build-manifest:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout (full history)
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# NOT the default shallow clone: scripts/build-manifest.py's per-file
|
|
# `git log -1 -- path` needs real history, or every file silently resolves to
|
|
# whatever the one shallow commit happens to be (see HT-15 belépő ellenőrzés).
|
|
fetch-depth: 0
|
|
|
|
# The CI environment: a plain ubuntu-latest job container (act_runner default image),
|
|
# with pandoc (markdown -> HTML, per HT-14) installed as an explicit step — not baked
|
|
# into a custom runner image, so the environment stays visible and reproducible
|
|
# directly from this file.
|
|
- name: Install pandoc
|
|
run: apt-get update -qq && apt-get install -y --no-install-recommends pandoc python3
|
|
|
|
- name: Build manifest
|
|
run: python3 scripts/build-manifest.py
|
|
|
|
# The rendered HTML is now small (no PDF, see build-manifest.py) — committing the
|
|
# whole dist/ output back to the repo consumers already git-clone for the markdown
|
|
# sources is cheap and avoids the Gitea Actions artifact API entirely (its repo-level
|
|
# list-artifacts endpoint returned empty even after a confirmed-successful upload in
|
|
# an earlier version of this workflow — a REST API gap, not worth depending on).
|
|
- name: Commit manifest + rendered HTML back to repo
|
|
run: |
|
|
rm -rf manifest
|
|
cp -r dist manifest
|
|
git config user.name "H2W Legal CI"
|
|
git config user.email "[email protected]"
|
|
git add manifest
|
|
if git diff --cached --quiet; then
|
|
echo "Manifest változatlan — nincs mit commitolni."
|
|
else
|
|
git commit -m "CI: legal-manifest.json + renderelt HTML frissítve [skip ci]"
|
|
git push origin HEAD:main
|
|
fi
|