Skip to content

Migrate docs.yaml to consume gha's new altdoc-multiversion-docs capability #169

Description

@d-morrison

Summary

d-morrison/gha#284 ports this
repo's bespoke .github/workflows/docs.yaml (multiversion altdoc docs: dev/
latest-tag/vX.Y.Z + PR previews + root redirect) into a reusable gha
capability (altdoc-multiversion-docs.yml, plus the two internal composites
generate-altdoc-version-dropdown / generate-altdoc-landing-page), so that
altdoc-based R packages -- including future packages created from this
template -- don't each carry their own copy of the version-dropdown and
landing-page scripts.

This repo (rpt), as the source of the pattern, is the natural first
consumer to switch over, dropping .github/scripts/generate_version_dropdown.py,
.github/scripts/generate_multiversion_landing_page.py, and most of
.github/workflows/docs.yaml in favor of a small caller stub (see
examples/altdoc-multiversion-docs.yml
once #284 merges and @v2 is advanced to include it).

Why not done now

Two open PRs -- #166 and #167 -- are actively editing
generate_version_dropdown.py / docs.yaml right now. Migrating this repo
onto the gha capability at the same time would collide with both. Deferring
until:

  1. #284 merges into d-morrison/gha and @v2 is advanced (or this repo
    pins a specific commit/branch in the interim).
  2. Fix hard-coded docs base URL in version dropdown generator #166/Rewrite legacy docs links in docs deploy workflow #167 are resolved (note: Fix hard-coded docs base URL in version dropdown generator #166 looks like it may already be
    superseded by Fix hard-coded docs base URL in version dropdown generator #165's own fix to the same hard-coded-BASE_URL bug --
    worth a look before continuing it).

Feature-parity checklist for whoever does the migration

Per this repo's own CLAUDE.md guidance on migrating a bespoke workflow to
a reusable one ("needs a feature-by-feature diff, not just a structural
read"), confirm each of these carries over, not just the high-level shape:

  • Version dropdown generation (stable/dev/previous tags)
  • Root landing-page redirect
  • PR-preview deploy and removal on close (note: rpt's original
    docs.yaml job-level if: skipped the whole job on PR close, so the
    preview directory was never actually removed -- gha#284's port fixes
    this; migrating rpt picks up the fix)
  • /latest-tag/ bootstrap-if-missing on first rollout
  • workflow_dispatch manual dev/stable redeploy, including the stable-tag
    worktree checkout
  • PR-preview repo-link rewriting (Edit this page / View source / GitHub icon)
  • "Report an issue" link repointing
  • Optional Julia setup (rpt's docs.yaml has a "Set up Julia" step with
    no corresponding DESCRIPTION dependency -- confirm whether this repo
    actually needs it before/after the migration, since the gha version
    makes it an opt-in setup-julia input defaulting to false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions