Reads buildinfo from a built site directory and compares each target's
recorded source trees to the current monorepo HEAD. Optionally uses
changed_files.txt (from GitHub Actions) to detect which packages are
touched by the current branch.
Usage
pkd_plan_build(
dest_dir,
monorepo_dir = ".",
changed_files_path = NULL,
base_ref = "origin/master",
head_ref = "HEAD",
branch_only = TRUE
)Arguments
- dest_dir
Path to the built site root (contains buildinfo.yaml files).
- monorepo_dir
Path to monorepo root (contains
packages/andpkgdown/). Default ".".- changed_files_path
Optional path to a text file listing changed files (one per line). If provided, overrides
base_ref/head_refcomparison.- base_ref
Git ref to diff from (ignored if
changed_files_pathis used).- head_ref
Git ref to diff to (ignored if
changed_files_pathis used).- branch_only
If TRUE, build only targets changed in this branch (PR mode); if FALSE, build all outdated or changed targets (post-merge reconcile).