action.yml at the repo root wraps
quartifyr::render_report() – the same Quarto pass-1 render
→ apply-layout → reportifyr pass-2 fill
pipeline described in vignette("r-package") – as a
composite GitHub
Action, so another repo’s own workflow can render its report without
hand-rolling the Quarto/R/reportifyr setup steps
itself.
It only renders and reports output paths; uploading the result as a build artifact is left to the calling workflow, same as any other render-then-upload action:
jobs:
render:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jprybylski/quartifyr@v1
id: render
with:
shell-qmd: report.qmd
final: 'true'
- uses: actions/upload-artifact@v4
with:
name: report
path: |
${{ steps.render.outputs.draft-docx }}
${{ steps.render.outputs.final-docx }}What it expects from the calling repo
Same idea as goreleaser/.goreleaser.yaml or
r-lib/actions/ renv.lock: this action doesn’t
set up a project from nothing, it expects one that’s already a proper
quartifyr + reportifyr project (see the repo README’s
“Standing up a new project” section):
- A shell
.qmd(theshell-qmdinput) with_extensions/quartifyr/_extensions/quarto-plusinstalled alongside it, and a_quarto.ymlsettingproject: {output-dir: report/shell}– load-bearing, not just a convention; see the “report/shell→report/draft/report/final” note in the repo-rootCLAUDE.md. - Its own
renv.lock(withreportifyr/pyropinned, same shape asexamples/demo-report/renv.lock) – the action installsquartifyritself into this project’s renv library (renv::install("jprybylski/quartifyr"), from GitHub, not from this action’s own checkout), it does not bring its own separate one. Whatever analysis packages producedOUTPUTS/figures//OUTPUTS/tables/belong in this lockfile too, since the action runsrenv::restore()against it before rendering. -
report/standard_footnotes.yamlandreport/config.yaml(reportifyr::initialize_report_project()’s usual output).
The action does not need inst/extensions/,
inst/templates/, or inst/python/ checked out
in the calling repo – installing the quartifyr R package
(above) brings all of those along as bundled package data.
Inputs
| Input | Required | Default | Meaning |
|---|---|---|---|
shell-qmd |
yes | – | Path to the shell .qmd, relative to the calling repo’s
root. |
final |
no | false |
Also produce report/final/ via
reportifyr::finalize_document(). |
reference-doc |
no | (unset) | Path to an org’s docx reference-doc, relative to the calling repo’s
root. Unset uses this action’s own bundled
inst/templates/org-reference.docx (quartifyr’s default
look) – see vignette("styling") for building your own. |
r-version |
no | release |
Passed straight to r-lib/actions/setup-r. |
initialize-project |
no | true |
Runs reportifyr::initialize_report_project() first. Set
false if the calling workflow already does this
itself. |
Outputs
shell-docx, draft-docx, and (only when
final: true) final-docx – paths to the
rendered docx files, for a following
actions/upload-artifact step (or any other step) to
consume.
What it actually does
- Installs Quarto, R (
r-lib/actions/setup-r), anduv. - Restores the calling project’s own
renv.lock(itsreportifyr/pyro, plus whatever else its analysis needs). - Installs the
quartifyrR package itself into the calling project’s renv library, viarenv::install("jprybylski/quartifyr")– pulling inpyro/reportifyrtransitively viaquartifyr’s ownDESCRIPTIONImports:if not already present. Note this installs from GitHub’s default branch, not necessarily the same ref this action itself was invoked at (uses: jprybylski/quartifyr@X) – fine while there’s no tagged release yet, but worth knowing if a caller has pinned the action to a stable tag and expects the R package to match. - Runs
reportifyr::initialize_report_project()(unlessinitialize-project: false) andquartifyr::initialize_quartifyr_project(). - Runs
quartifyr::render_report(shell_qmd, status, reference_doc)directly viaRscript, with the working directory set to the calling project’s own directory – so R’s normal startup activates that project’srenv/.Rprofile(giving the sessionquartifyr,reportifyr,pyro). Unlike the pre-restructuring version of this action, there’s no separate--toolkit-rootconcept anymore: whenreference-docisn’t set,render_report()’s own default resolves the package’s bundled template viasystem.file()– unless the project’s own.qmd/_quarto.ymlalready configures one, in which case that wins instead – since the package itself is now what’s installed into the project, not just referenced from an external checkout path.
Known limitations
-
recalculate_fields/resolve_same_page_crossrefs(both off by default inrender_report()itself; seevignette("r-package")) aren’t exposed as inputs. Both are documented as experimental/flaky even in a plain terminal, so running them unattended in CI is a bigger ask than a first version of this action should default to. - No dependency caching
(
renv::restore()/uv/system packages run fresh every invocation). Fine for occasional report renders; a frequently-triggered workflow may want to fork the action’s steps and addactions/cachearoundrenv’s library and theuvcache directory.
