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 "ci@h2w.hu" 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