CI: sablon-feloldás automatizálása; tárhely átírása bérelt szerverre
A CI mostantól a build-manifest.py előtt lefuttatja a render-templates.py-t, és a feloldott dokumentumokat is visszacommitolja a manifest+HTML mellé — mostantól a _data.json / _templates szerkesztése önmagában elég, nem kell kézzel futtatni és commitolni a render-templates.py-t. A trigger paths-ignore-ja kiegészült a '*/*.md' mintával (a generált fájlok commit-backje ne indítson újabb buildet), a _templates/ almappa mélyebben van, így ez nem szűri ki a tényleges szerkesztéseket. A "saját tulajdonú hardver" megfogalmazás mind a 4 dokumentumban javítva "a Nethely Kft.-től bérelt szerver"-re — a tényleges konstrukció klasszikus szerverbérlés, nem a Szolgáltató tulajdonában lévő, kolokált hardver. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
d32c73d409
commit
df3c5df988
@@ -4,11 +4,21 @@ name: Build legal manifest
|
||||
# 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.
|
||||
#
|
||||
# Also resolves scripts/render-templates.py: the tracked <project>/*.md files are generated
|
||||
# from <project>/_templates/*.md + <project>/_data.json (single-sourced repeated data like
|
||||
# the provider's identity or sub-processor list — see the repo README). Editors touch the
|
||||
# templates/data, not the tracked .md; CI resolves and commits the result, same pattern as
|
||||
# the manifest/HTML commit-back below.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore: [manifest/**] # avoid the commit-back step (below) re-triggering itself
|
||||
# Avoids the commit-back step (below) re-triggering itself. '*/*.md' matches only a
|
||||
# project's top-level, generated *.md files (e.g. H2W-Ticketing/aszf.md) — NOT
|
||||
# H2W-Ticketing/_templates/*.md, which is one level deeper and must still trigger a
|
||||
# rebuild when a human edits it.
|
||||
paths-ignore: [manifest/**, '*/*.md']
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
@@ -30,6 +40,13 @@ jobs:
|
||||
- name: Install pandoc
|
||||
run: apt-get update -qq && apt-get install -y --no-install-recommends pandoc python3
|
||||
|
||||
# Resolves _templates/*.md + _data.json into the tracked <project>/*.md files, so a
|
||||
# single-source data edit (e.g. a changed address) reaches every document that
|
||||
# references it before build-manifest.py hashes and renders them. Pure stdlib, no
|
||||
# extra install step needed. No-op for a project without a _templates/ dir.
|
||||
- name: Sablonok feloldása (_templates + _data.json -> *.md)
|
||||
run: python3 scripts/render-templates.py
|
||||
|
||||
- name: Build manifest
|
||||
run: python3 scripts/build-manifest.py
|
||||
|
||||
@@ -38,16 +55,22 @@ jobs:
|
||||
# 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
|
||||
#
|
||||
# The resolved *.md files are committed alongside the manifest for the same reason:
|
||||
# consumers (H2W_Ticketing_home, ResidentFirst) git-clone this repo and read the
|
||||
# top-level <project>/*.md directly, never _templates/ — so the resolved text must be
|
||||
# what's actually sitting on main, not just re-derivable from it.
|
||||
- name: Commit feloldott dokumentumok + manifest + renderelt HTML vissza a repóba
|
||||
run: |
|
||||
rm -rf manifest
|
||||
cp -r dist manifest
|
||||
git config user.name "H2W Legal CI"
|
||||
git config user.email "[email protected]"
|
||||
git add manifest
|
||||
git add -- '*/*.md'
|
||||
if git diff --cached --quiet; then
|
||||
echo "Manifest változatlan — nincs mit commitolni."
|
||||
echo "Nincs mit commitolni — a feloldott dokumentumok és a manifest változatlanok."
|
||||
else
|
||||
git commit -m "CI: legal-manifest.json + renderelt HTML frissítve [skip ci]"
|
||||
git commit -m "CI: jogi dokumentumok feloldva + legal-manifest.json + renderelt HTML frissítve [skip ci]"
|
||||
git push origin HEAD:main
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user