Skip to content

ci: fail pull requests when generated README is stale - #1871

Closed
yuyua9 wants to merge 1 commit into
Anduin2017:masterfrom
yuyua9:codex/howtocook-ci-generation-guard
Closed

ci: fail pull requests when generated README is stale#1871
yuyua9 wants to merge 1 commit into
Anduin2017:masterfrom
yuyua9:codex/howtocook-ci-generation-guard

Conversation

@yuyua9

@yuyua9 yuyua9 commented Sep 2, 2026

Copy link
Copy Markdown

Summary

This adds a pull-request-time check for generated documentation artifacts.
The PR workflow now runs npm run build and fails when the generated README.md differs from the committed file.

Why

The repository's push workflow currently regenerates documentation and can create [ci skip] Automatic file changes/fix commits after changes land on master. Checking the generated output during the pull request keeps the PR self-contained and makes stale generated files visible before merge.

Tests

  • npm install --no-audit --no-fund
  • npm run lint
  • npm run build
  • git diff --exit-code -- README.md

Real behavior proof

  • Behavior or issue addressed: A pull request with a stale generated README.md now fails its CI job instead of relying on a post-merge auto-fix commit.
  • Real environment tested: Local checkout of Anduin2017/HowToCook at origin/master commit c694a5c457d45e6e012ae6cd9a7724aab86e320b.
  • Exact steps or command run after this patch: npm run build followed by git diff --exit-code -- README.md.
  • Evidence after fix: Both commands exited 0 and the generated README remained unchanged.
  • Observed result after fix: The workflow file is the only changed path; git diff --check also exits 0.
  • What was not tested: GitHub-hosted Actions execution and maintainer merge behavior were not tested locally.

@Anduin2017 Anduin2017 closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants