mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-20 21:20:19 -05:00
Standardize book-publish-live flag to site_only (was skip_version)
Aligns book-publish-live.yml with the rest of the publish workflows
(instructors, kits, labs, mlsysim, slides, staffml, tinytorch), which
all use:
site_only:
type: boolean
default: false
The book workflow was the lone outlier carrying:
skip_version:
type: choice
options: [no, yes]
default: 'no'
Behavior is unchanged: site_only=true skips the DOI rewrite, tag
creation, release-notes generation, and GitHub Release creation while
still running the full HTML/PDF/EPUB build and gh-pages deploy.
Changes:
- workflow_dispatch.inputs.skip_version → site_only (choice → boolean)
- workflow_call.inputs.skip_version → site_only (string → boolean)
- 5x `inputs.skip_version != 'yes'` → `inputs.site_only != 'true'`
- Inline comment update describing the skip-cascade guard
Per the project's release convention, workflow file changes must be
on main before any dispatch that uses the new input name. Merge dev
into main and push both branches before the next workflow_dispatch
that wants to set site_only=true.
This commit is contained in:
@@ -184,14 +184,11 @@ on:
|
||||
- 'vol1'
|
||||
- 'vol2'
|
||||
default: 'all'
|
||||
skip_version:
|
||||
description: 'Skip the version bump? When yes, the merge to main, full build (HTML/PDF/EPUB), and gh-pages deploy all run normally, but the doi rewrite, tag creation, release-notes generation, and GitHub Release creation are skipped. Use this for post-release content tweaks where the version should stay at its current value.'
|
||||
site_only:
|
||||
description: 'Website-only deploy? When true, the merge to main, full build (HTML/PDF/EPUB), and gh-pages deploy all run normally, but the DOI rewrite, tag creation, release-notes generation, and GitHub Release creation are skipped. Use this for post-release content tweaks where the version should stay at its current value.'
|
||||
required: false
|
||||
type: choice
|
||||
options:
|
||||
- 'no'
|
||||
- 'yes'
|
||||
default: 'no'
|
||||
type: boolean
|
||||
default: false
|
||||
workflow_call:
|
||||
inputs:
|
||||
description:
|
||||
@@ -233,10 +230,10 @@ on:
|
||||
type: string
|
||||
required: false
|
||||
default: 'all'
|
||||
skip_version:
|
||||
type: string
|
||||
site_only:
|
||||
type: boolean
|
||||
required: false
|
||||
default: 'no'
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -593,7 +590,7 @@ jobs:
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: 🛡️ No-downgrade guard (per-volume)
|
||||
if: inputs.skip_version != 'yes'
|
||||
if: inputs.site_only != 'true'
|
||||
env:
|
||||
# Step `run:` blocks don't inherit shell variables across steps;
|
||||
# surface the per-volume outputs as env so the guard can read them.
|
||||
@@ -857,7 +854,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
needs: [validate-inputs, pre-flight-checks]
|
||||
if: inputs.confirm == 'PUBLISH' && inputs.testing_mode != 'yes' && inputs.skip_version != 'yes'
|
||||
if: inputs.confirm == 'PUBLISH' && inputs.testing_mode != 'yes' && inputs.site_only != 'true'
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout repository
|
||||
@@ -1081,7 +1078,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
needs: merge-to-main
|
||||
# always() guards against the skip cascade that happens when update-version
|
||||
# is skipped (skip_version=yes) and merge-to-main runs under its own
|
||||
# is skipped (site_only=true) and merge-to-main runs under its own
|
||||
# always() — without this, GitHub propagates the skip through the chain
|
||||
# and the build never runs, leaving the gh-pages deploy stale.
|
||||
if: |
|
||||
@@ -1133,7 +1130,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
needs: [validate-inputs, download-and-deploy-artifacts]
|
||||
if: inputs.confirm == 'PUBLISH' && inputs.testing_mode != 'yes' && inputs.skip_version != 'yes'
|
||||
if: inputs.confirm == 'PUBLISH' && inputs.testing_mode != 'yes' && inputs.site_only != 'true'
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout repository
|
||||
@@ -1713,7 +1710,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
needs: [validate-inputs, download-and-deploy-artifacts]
|
||||
if: inputs.confirm == 'PUBLISH' && inputs.testing_mode != 'yes' && inputs.skip_version != 'yes'
|
||||
if: inputs.confirm == 'PUBLISH' && inputs.testing_mode != 'yes' && inputs.site_only != 'true'
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout repository
|
||||
@@ -1994,7 +1991,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
needs: [validate-inputs, generate-release-notes, create-tag]
|
||||
if: inputs.confirm == 'PUBLISH' && inputs.testing_mode != 'yes' && inputs.skip_version != 'yes'
|
||||
if: inputs.confirm == 'PUBLISH' && inputs.testing_mode != 'yes' && inputs.site_only != 'true'
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout repository
|
||||
|
||||
Reference in New Issue
Block a user