A generated theme.json, three years after the pipeline was built, and the check that has kept it honest.
- name: tokens are in sync
run: |
node build/tokens.mjs
git diff --exit-code theme.json assets/css/tokens.css
|| { echo '::error::run node build/tokens.mjs'; exit 1; }
Two commands, and they have fired four times in three years — every one of them somebody editing the generated file directly because it was the file they found. A generated artefact under version control needs this check or the generation becomes advisory, and the failure is silent: the next build overwrites the edit.