Files
cs249r_book/.github/scripts
Vijay Janapa Reddi 1499c0d58f refactor: move volumes to top-level /vol1/ and /vol2/ URLs
The project's source convention (navbar, footer, announcements,
instructor course-map, etc.) already treats mlsysbook.ai/vol1/ and
mlsysbook.ai/vol2/ as the canonical URLs. The /book/vol1/ nesting was
an artifact of the legacy single-volume textbook still occupying /book/
on live, kept alive by a special-case mapping in the dev URL rewriter.
This refactor aligns the actual deploy paths with the source convention
before Monday's release locks in citation-grade URLs.

Public URL change:
  was:   https://mlsysbook.ai/book/vol1/  + .../book/vol2/
  is:    https://mlsysbook.ai/vol1/       + .../vol2/

Variable change (set on harvard-edge/cs249r_book):
  VOL1_DEPLOY_PATH=vol1   (new)
  VOL2_DEPLOY_PATH=vol2   (new)
  BOOK_DEPLOY_PATH=book   (will be deleted post-merge)

Workflow changes:

  book-publish-live.yml
    - Reads VOL1_DEPLOY_PATH + VOL2_DEPLOY_PATH (fail-fast on empty).
    - Each volume deploys to its own top-level path on gh-pages.
    - Skip-list regex now includes both top-level paths plus 'book' so
      the legacy single-volume textbook at /book/ stays untouched
      (the user-facing front door remains the OLD textbook until an
      explicit cutover via the Cloudflare redirect).
    - Root index.html redirect now targets /$VOL1_PATH/ instead of
      /$BOOK_PATH/vol1/. The CF redirect is what users see; this is
      a fallback only.
    - Validation, commit message, and step summary lines log both
      volume paths separately rather than a single book parent.

  book-preview-dev.yml
    - Same VOL1/VOL2 read with fail-fast guard.
    - Cleans /vol1/, /vol2/, AND legacy /book/ on the dev preview repo
      to avoid zombie content from the previous nested deploy.
    - Copies preview-site/vol1 → /vol1/ and preview-site/vol2 → /vol2/
      separately (no longer wraps both under /book/).
    - Drops the /book/ chooser page on dev (the dev landing page
      already has volume cards). The chooser file stays in the repo
      for the eventual live cutover.

  publish-all-live.yml
    - Step summary now lists Volume I and Volume II as separate links.

  rewrite-dev-urls.sh
    - vol1 → vol1, vol2 → vol2 (identity mapping; matches every other
      subsite). The PREFIX depth math stays generic for any future
      nested subsite.

  site/index.qmd
    - Volume cards link to vol1/ and vol2/ (top-level relative). On
      live this resolves to mlsysbook.ai/vol1/ and mlsysbook.ai/vol2/.

Result: zero asymmetry between the volume URL convention used in source
and the actual deploy paths. The dev URL rewriter no longer needs a
special case. Citations made against Monday's release URLs will be
permanent and aligned with the project's everyday URL vocabulary.
2026-04-25 19:20:02 -04:00
..