Add CI workflow to build book PDF and diff on PRs - #25
Draft
yarikoptic wants to merge 1 commit into
Draft
Conversation
Adds a GitHub Actions workflow that, on every PR against `main`: - builds the book PDF from the PR branch and from the base branch (both with `mystmd`'s `plain_latex_book` template, pinned to sidestep the Typst export's issue with `**X**yz` bold markdown patterns), - runs `diff-pdf` inside the ghcr.io/stamped-principles/diff-pdf container to produce a full diff PDF plus per-page 3-panel montages, - pushes both PDFs and the per-page images to a per-PR orphan branch `gh-pages-pr-<N>` so reviewers can browse them via raw.github links from the PR conversation, and - posts (and updates) a single PR comment linking the artifacts and summarizing changed / unchanged / added / removed pages. A companion `cleanup-pr-preview.yml` deletes the orphan branch when the PR is closed. Modeled on stamped-principles/stamped-paper's build-pdf.yml pattern; adapted for this repo by building the base PDF locally (this repo does not publish the PDF to Pages). Co-Authored-By: Claude Code 2.1.204 / Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.github/workflows/build-pdf.yml,cleanup-pr-preview.yml, and.github/scripts/diff-book-pdf.sh. Modeled on the stamped-principles/stamped-paper pattern; builds base PDF locally rather than fetching from a Pages URL. Enables reviewer preview + page-by-page diff on every PR.likely might need fixups etc... just thought to run idea by first. See example stamped-principles/stamped-paper#183 (comment) besides that diff previews no longer available since upon merge we remove the branch which contains all those individual pages diffs... I can later prepare a PR which demonstrates it there