name: Build legal manifest # HT-14: renders every project's legal markdown to HTML+PDF 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; this workflow just provides the environment it needs. on: push: branches: [main] 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) and WeasyPrint (HTML -> PDF, same # approach already proven deterministic for ResidentFirst's HRF-34 offer contracts) # 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 + WeasyPrint run: | apt-get update -qq apt-get install -y --no-install-recommends \ pandoc python3 python3-pip python3-venv \ libpango-1.0-0 libpangoft2-1.0-0 fonts-dejavu-core python3 -m venv /tmp/venv /tmp/venv/bin/pip install --quiet weasyprint==69.0 echo "/tmp/venv/bin" >> "$GITHUB_PATH" - name: Build manifest run: python3 scripts/build-manifest.py # v4 uses a newer artifact-storage protocol this Gitea version doesn't implement yet # ("GHESNotSupportedError", confirmed empirically) — v3 uses the older, supported one. - name: Upload manifest + rendered artifacts uses: actions/upload-artifact@v3 with: name: legal-manifest path: dist/