From 06256699594954a51266b04e09644543356a6f20 Mon Sep 17 00:00:00 2001 From: Drew Herren Date: Thu, 30 Jul 2026 15:28:26 -0500 Subject: [PATCH] Build rc-0.5.0 docs from a single monorepo checkout The RC version pinned its R and Python builds to the generated r-rc-0.5.0 / py-rc-0.5.0 deploy branches, which exist solely to ship installable packages. Because r-rc-0.5.0 carries no _pkgdown.yml, the RC R docs fell back to pkgdown's auto-generated reference index, and cpp_ref pointed at main, so the RC sub-site published main's Doxygen output. Point every ref at the monorepo rc-0.5.0 branch and bootstrap the CRAN package the same way `latest` does. This picks up the branch's own _pkgdown.yml, builds the RC C++ docs from RC sources, and sources the changelog from the monorepo NEWS.md rather than the packaged branch's copy. No change to the code that gets installed: py-rc-0.5.0 is deployed from rc-0.5.0 HEAD exactly, and r-rc-0.5.0 trailed it only by Python-only commits. Verified against rc-0.5.0: cran-bootstrap.R 0 1 0 then pkgdown::check_pkgdown() reports no problems, and build_site_github_pages(install = TRUE) exits 0 with all nine previously unindexed topics present in the reference index. Co-Authored-By: Claude Opus 5 --- .github/workflows/docs.yml | 17 ++++++++++------- versions.json | 10 +++++----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 138ba1428..ca5186c6c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -76,10 +76,11 @@ jobs: path: 'stochtree_repo_py' submodules: 'recursive' - # C++ core source for Doxygen. Only some versions ship the C++ core + - # Doxyfile (e.g. the monorepo default branch); single-language packaged - # branches (r-rc-*, py-rc-*) do not, so this is gated on `build_cpp` and - # uses its own ref. + # C++ core source for Doxygen. Only monorepo branches ship the C++ core + + # Doxyfile; a version pinned to a single-language packaged branch (r-rc-*, + # py-rc-*) would not, so this stays gated on `build_cpp` and keeps its own + # ref. Every current version builds from a monorepo branch, so `cpp_ref` + # matches the R/Python refs. - name: Checkout stochtree C++ source (${{ matrix.cpp_ref || 'default' }}) if: ${{ matrix.build_cpp }} uses: actions/checkout@v4 @@ -140,9 +141,11 @@ jobs: extra-packages: any::latex2exp, any::ggplot2, any::decor, any::pkgdown, any::reticulate, any::bayesplot, any::coda, any::doParallel, any::foreach, any::mvtnorm, any::rpart, any::rpart.plot, any::tgp, any::rprojroot needs: website - # The monorepo default branch assembles a CRAN-friendly package into - # stochtree_cran; pre-packaged branches (r-rc-*) already are that package, - # so they skip the bootstrap and point r_pkg_path at the checkout root. + # Monorepo branches assemble a CRAN-friendly package into stochtree_cran, + # which is also what carries _pkgdown.yml into the package pkgdown builds + # from (cran-bootstrap.R's second argument). A version pinned to a + # pre-packaged branch (r-rc-*) is already that package, so it would set + # r_bootstrap: false and point r_pkg_path at the checkout root instead. - name: Assemble CRAN-friendly R package if: ${{ matrix.r_bootstrap }} run: | diff --git a/versions.json b/versions.json index 4a19577b3..898fcae7b 100644 --- a/versions.json +++ b/versions.json @@ -13,12 +13,12 @@ { "name": "rc-0.5.0", "docs_ref": "rc-0.5.0", - "cpp_ref": "main", + "cpp_ref": "rc-0.5.0", "build_cpp": true, - "r_ref": "r-rc-0.5.0", - "r_bootstrap": false, - "r_pkg_path": "stochtree_repo", - "py_ref": "py-rc-0.5.0", + "r_ref": "rc-0.5.0", + "r_bootstrap": true, + "r_pkg_path": "stochtree_repo/stochtree_cran", + "py_ref": "rc-0.5.0", "target": "v/rc-0.5.0" } ]