Skip to content

ci: rebuild Actions on GITHUB_TOKEN and generate the API at deploy time - #377

Open
Seungpyo1007 wants to merge 5 commits into
developfrom
ci/safe-actions
Open

Seungpyo1007 wants to merge 5 commits into
developfrom
ci/safe-actions

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

Summary

Brings back CI and the Pages deploy with no personal access token anywhere. Every job runs on this repository's read-only GITHUB_TOKEN; the only write is the Pages deploy. TechEngineBot is used in exactly one place: the comment of a final check a maintainer asks for.

Change

  • pages.yml: on a push to main (a merged release PR) or by hand. It validates the data, generates site/public/v1, openapi.json and data/_verify/status.json with the pinned TechEngine, checks every collection's counts against data/, builds the site and deploys it. A manual run on any other branch is a dry run.
  • pr-checks.yml: every PR into develop or main. It runs the bundled validator, TechEngine's validator on the changed records (every record when the pin moves), the integrity gate, a Tier 0 report and, when site/ changes, the site build. Results go to the job summary and file annotations; it never comments.
  • final-check.yml: when a maintainer adds the final-check label. It builds everything pages.yml would publish from the PR, and TechEngineBot posts one comment with the verdict, edited in place on re-runs. Only the comment job sees TECHENGINEBOT_TOKEN, and it refuses anything but a fine-grained token of TechEngineBot. Fork PRs get no comment.
  • dependabot.yml: the TechEngine submodule bump (weekly) and grouped action updates (monthly), at most one open PR each, into develop.
  • The generated API is no longer committed (about 315k files). .gitignore keeps only the hand-made v1/games/index.json pointer. The unanchored build/ and env/ rules that hid v1/software/build and v1/software/env are now anchored to the root.
  • build-history.mjs: the growth chart now continues from the commits that changed data/ after the last committed manifest.
  • Docs: the README covers the new workflows and local preview. The PR template no longer promises automatic sidebar metadata.

All actions are pinned by SHA. Engine steps run with every proxy pointed at a closed port, so they cannot reach third-party sites.

Not changed

Settings (applied by hand, not in this diff)

Actions was re-enabled just before this PR opened, so pr-checks runs on it:

  • GitHub-owned actions only, with SHA pinning required.
  • A read-only GITHUB_TOKEN that cannot approve PRs.
  • Approval required for runs from external contributors.
  • An Actions policy that allows only push, pull_request and workflow_dispatch, triggered by Seungpyo1007 or dependabot[bot].

Check

  • Offline locally on the pinned engine: the bundled validator, the engine validator, integrity_check.py --strict and app.verify status all passed. The regenerated status.json differs from the committed one only in generated_at. A smoke dump of brands and socs passed.
  • check_dump.py on the committed dump fails only software (42,493 records but 42,491 pages), which is the ignored build/env defect this fixes.
  • The final-check report script was run locally for the pass and failure cases. Backticks and @ are removed from quoted logs.
  • These workflows have not run on GitHub yet. The first run will be a pages.yml dry run on develop after merge.

Closes #297

Bring back the Pages deploy without any token and without committing
generated files. pages.yml runs on a push to main (a merged release PR)
or by hand. It validates the data, regenerates site/public/v1,
openapi.json and data/_verify/status.json with the pinned TechEngine,
checks every collection's counts against data/, builds the site and
publishes it. A manual run on any other branch is a dry run.

The build job can only read the repository; only the deploy job can
write, and only to Pages. Engine steps run with every proxy pointed at
a closed port, so they cannot reach third-party sites. Actions are
pinned by SHA.

Regenerating at deploy time also fixes what the committed dump gets
wrong today: the software pages named build and env, which .gitignore
keeps out of git, and records changed since the last dump refresh.

Refs #297
… check

pr-checks.yml runs on every PR into develop or main with a read-only
token and no secrets: the bundled validator, TechEngine's validator on
the changed records (every record when the pin moves), the integrity
gate, a Tier 0 report and, when site/ changes, the site build. Results
go to the job summary and file annotations; nothing is commented.

final-check.yml runs when a maintainer adds the final-check label to a
PR. It builds what pages.yml would publish from the PR, and
TechEngineBot posts one comment with the verdict, edited in place when
the label is added again. Only that comment uses TECHENGINEBOT_TOKEN,
and the job refuses anything but a fine-grained token of TechEngineBot.
Fork PRs get no comment.

Dependabot opens the TechEngine submodule bump weekly and grouped
action updates monthly, at most one open PR each, into develop.

Nothing fills the PR sidebar automatically any more, so the template
asks for it.

Refs #297
pages.yml now generates site/public/v1 and openapi.json at deploy time
from the data it publishes, so the committed copy only went stale and
grew the repository with every refresh. Remove it from the index (the
files stay on disk) and ignore it, keeping only the hand-made
v1/games/index.json pointer.

Anchor the build/, dist/, env/, venv/, .venv/ and htmlcov/ rules to the
repository root: unanchored, build/ and env/ also matched the software
pages v1/software/build and v1/software/env, so those two never reached
the site.

The growth chart read its points from the history of v1/index.json.
build-history.mjs keeps those and continues from the first-parent
commits that changed data/, counting one JSON file per record as the
manifest does.

Refs #297
@Seungpyo1007 Seungpyo1007 added documentation Improvements or additions to documentation site Homepage and public site changes ci CI and workflow changes labels Oct 29, 2026
@Seungpyo1007
Seungpyo1007 requested a balanced review from Copilot October 29, 2026 09:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

No open issues 🎉

Review effort: Balanced

The job summary is not readable through the API, so a passing run left
no record of what it checked anywhere but the web page.

Refs #297
@Seungpyo1007 Seungpyo1007 added the final-check Maintainer: ask TechEngineBot for a final validation comment label Oct 29, 2026
The first full run on GitHub took 49 minutes to generate the API, which
left pages.yml (full-history checkout, upload) too little room under 90.

Refs #297

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Assignees

Couldn't load assignees.