Migrate claude.yml, claude-code-review.yml, and publish.yml to Morrison-Lab/gha reusable workflows - #83
Conversation
All three files were stock hand-rolled templates. Replace them with caller stubs targeting gha's reusable workflows at @v2. claude.yml gains a trusted-author gate (the stock template fired on any @claude mention from anyone) and write permissions, so the agent can push a branch and open a PR rather than only comment. setup-r is turned off: it defaults on, and with use-renv false it resolves local::. against a DESCRIPTION this repo does not have. claude-code-review.yml drops the pull_request trigger in favour of gha's dispatch path. claude.yml re-dispatches a review after the agent pushes, so an agent PR is still reviewed automatically; keeping a synchronize trigger alongside that would race it, and the reusable workflow's cancel-in-progress concurrency would cancel one of the two. Human PRs review via /review. publish.yml serializes gh-pages deploys, names its R dependencies directly (no renv lockfile, no DESCRIPTION), drops the unused tinytex install, and files an issue when a deploy fails. Secrets are passed explicitly in every stub: this repo is d-morrison-owned and gha is Morrison-Lab-owned, so secrets: inherit would yield an empty token. preview.yml is left alone. gha's preview composite has no r-packages input, so a Quarto site that is neither an renv project nor an R package cannot use it; tracked as Morrison-Lab/gha#607 and #82. Refs #81 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DzqQ9SB4Uw9ykenZ8xmPZM
The project-level _quarto.yml declares `format: html` only, so dropping the TinyTeX install looked like removing a cargo-culted step. It is not: demo-shortcode.qmd and demo-include-in-header.qmd each override the project format with their own `pdf:` front matter, and showing the macros land in the LaTeX preamble is what those two pages exist to demonstrate. Without TinyTeX the render fails on them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DzqQ9SB4Uw9ykenZ8xmPZM
Self-reviewPosted as a fallback: this PR removes the Performed inline rather than by an independent reviewer subagent — no Findings1. 2.
This is how every gha consumer already behaves, so it is a property of the shared workflow rather than of this migration, and it is out of scope for this PR under the adjacent-work boundary. Filed rather than deferred silently: Morrison-Lab/gha#611. Verified
|
|
Refs #81. First of two legs; the preview leg is #82, blocked on Morrison-Lab/gha#607.
Replaces three stock hand-rolled workflow templates with caller stubs targeting
Morrison-Lab/gha's reusable workflows at@v2.What changes
claude.ymlanthropics/claude-code-action@v1templategha/.github/workflows/claude.yml@v2claude-code-review.ymlgha/.github/workflows/claude-code-review.yml@v2publish.ymlJamesIves/github-pages-deploy-actiongha/.github/workflows/quarto-publish.yml@v2+report-failure.yml@v2preview.ymlis untouched — see the blocker below.Notable decisions
setup-r: falseonclaude.yml. The input defaults totrue, and withuse-renvfalse it runssetup-r-dependencies, whose defaultlocal::.spec resolves against aDESCRIPTION. This repo is a Quarto site, not an R package, so that step would fail on every agent run. Rendering is CI's job.No
pull_requesttrigger onclaude-code-review.yml.claude.ymlre-dispatches a review after the agent pushes commits, so an agent-authored PR is still reviewed automatically. Keeping asynchronizetrigger alongside that dispatch would race it, and the reusable workflow'scancel-in-progressconcurrency would cancel one of the two. A human-authored PR gets a review via/review.tinytex: truekept onpublish.yml. The input defaults to false, and_quarto.ymldeclaresformat: htmlonly, so dropping it looks safe. It is not:demo-shortcode.qmdanddemo-include-in-header.qmdeach override the project format with their ownpdf:front matter, and demonstrating the macros reaching the LaTeX preamble is the entire point of those two pages.Secrets passed explicitly everywhere. This repo is
d-morrison-owned andghaisMorrison-Lab-owned. GitHub only inherits secrets into a reusable workflow owned by the same org/user, sosecrets: inheritwould hand each workflow an empty token.What this buys
claude.ymlfired on an@claudemention from anyone, with noauthor_associationcheck.contents: readand so cannot push a branch or open a PR at all.Morrison-Lab/ai-configplugin in both agent workflows, so the bot follows lab conventions.@v4/@v2tags.gh-pagesdeploys, and an auto-filed issue when a publish breaks.Blocker on the remaining leg
gha's preview composite installs R but has nor-packagesinput, so a Quarto site that is neither an renv project nor an R package cannot getknitr/rmarkdown/DTonto the runner. Filed as Morrison-Lab/gha#607; the preview migration andcheck-equation-renders.yml(a headless-browser MathJax check, which is the single most relevant check available to this repo) are tracked in #82 behind it.Verification
actionlintclean on all four workflow files.v2tag (9ad1cde).CLAUDE_CODE_OAUTH_TOKENconfirmed present on this repo.Note that the review path for this PR itself runs from
main's workflows, since the new stubs are not on the default branch yet.