Restore walkthrough workflow YAML
A YAML file is strict about where a block scalar ends. This bug was not about Python logic; it was about Python lines accidentally stepping outside the shell script they belonged to.
The mental model: the run: | block is a fenced yard. Every shell line, including a Python heredoc body, must stay indented inside that yard or YAML treats it as a new top-level document key.
What broke
The upload step uses small inline Python programs to infer the issue number from a walkthrough filename and extract the page title from the first <h1>. After the previous workflow edit, those heredoc bodies started at column 1.
That meant GitHub Actions never reached AWS, S3, CloudFront, or Slack. The parser failed before the job graph could even start, which is why the runs ended almost immediately.
What changed
Story number extraction
The Python heredoc now stays indented under the upload step's run: block.
Title extraction
The matching title parser heredoc received the same indentation repair.
Index rebuild
The larger rebuild heredoc was checked and already remained inside its YAML block.
Why this fix is intentionally small
The shell script already had the right behavior: read changed walkthrough files, upload flat numeric keys, rebuild the index, and invalidate CloudFront. Changing Python content would have made the fix harder to review and risked a behavior regression.
The product situation is simple: the publishing machine was built, but the switchboard diagram had two wires drawn outside the box. Put the wires back inside the box and the machine can run again.
How to verify
- Run the local YAML parse check with PyYAML.
- Confirm the workflow file contains no Python heredoc body at column 1.
- Dispatch
publish-walkthroughs.ymlafter merge. - Confirm the workflow uploads existing walkthroughs, rebuilds
index.html, and creates the CloudFront invalidation.
Engineering outcome: syntax validation catches this class of failure locally, while the merged workflow proves the actual publishing path still works against AWS.