mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-04-29 17:20:21 -05:00
Adds Windows book builds and refines Quarto content
Introduces Windows HTML, PDF, and EPUB build configurations for both Volume I and Volume II in the GitHub Actions workflow, expanding the available output formats for the book. Updates Quarto callout and figure syntax from `::::` to `:::` across numerous content files for consistency and compatibility. Removes unreferenced `war_stories.bib` and `data_engineering.bib` bibliography files and their corresponding entries in Quarto configuration. Standardizes internal references to the 'Responsible AI' chapter by updating `@sec-responsible-engineering` to `@sec-responsible-ai` for improved linking accuracy throughout the text.
This commit is contained in:
152
.github/workflows/book-build-container.yml
vendored
152
.github/workflows/book-build-container.yml
vendored
@@ -124,6 +124,26 @@ on:
|
||||
linux_epub_vol2_artifact:
|
||||
description: "Linux EPUB artifact name (Volume II)"
|
||||
value: ${{ jobs.collect-outputs.outputs.linux_epub_vol2_artifact }}
|
||||
# Windows Volume I artifacts
|
||||
windows_html_vol1_artifact:
|
||||
description: "Windows HTML artifact name (Volume I)"
|
||||
value: ${{ jobs.collect-outputs.outputs.windows_html_vol1_artifact }}
|
||||
windows_pdf_vol1_artifact:
|
||||
description: "Windows PDF artifact name (Volume I)"
|
||||
value: ${{ jobs.collect-outputs.outputs.windows_pdf_vol1_artifact }}
|
||||
windows_epub_vol1_artifact:
|
||||
description: "Windows EPUB artifact name (Volume I)"
|
||||
value: ${{ jobs.collect-outputs.outputs.windows_epub_vol1_artifact }}
|
||||
# Windows Volume II artifacts
|
||||
windows_html_vol2_artifact:
|
||||
description: "Windows HTML artifact name (Volume II)"
|
||||
value: ${{ jobs.collect-outputs.outputs.windows_html_vol2_artifact }}
|
||||
windows_pdf_vol2_artifact:
|
||||
description: "Windows PDF artifact name (Volume II)"
|
||||
value: ${{ jobs.collect-outputs.outputs.windows_pdf_vol2_artifact }}
|
||||
windows_epub_vol2_artifact:
|
||||
description: "Windows EPUB artifact name (Volume II)"
|
||||
value: ${{ jobs.collect-outputs.outputs.windows_epub_vol2_artifact }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -224,6 +244,84 @@ jobs:
|
||||
enabled: ${{ inputs.build_linux && inputs.build_epub && (inputs.build_target == 'vol2' || inputs.build_target == 'all') }}
|
||||
artifact_name: ${{ inputs.target }}-epub-vol2-linux
|
||||
output_dir: _build/epub-vol2
|
||||
# =================================================================
|
||||
# Volume I builds (Windows)
|
||||
# =================================================================
|
||||
- platform: windows
|
||||
platform_name: Windows
|
||||
platform_emoji: '🪟'
|
||||
runner: windows-latest
|
||||
format_name: HTML
|
||||
format_emoji: '📄'
|
||||
volume: vol1
|
||||
config: _quarto-html-vol1.yml
|
||||
render_target: html
|
||||
enabled: ${{ inputs.build_windows && inputs.build_html && (inputs.build_target == 'vol1' || inputs.build_target == 'all') }}
|
||||
artifact_name: ${{ inputs.target }}-html-vol1-windows
|
||||
output_dir: _build/html-vol1
|
||||
- platform: windows
|
||||
platform_name: Windows
|
||||
platform_emoji: '🪟'
|
||||
runner: windows-latest
|
||||
format_name: PDF
|
||||
format_emoji: '📑'
|
||||
volume: vol1
|
||||
config: _quarto-pdf-vol1.yml
|
||||
render_target: titlepage-pdf
|
||||
enabled: ${{ inputs.build_windows && inputs.build_pdf && (inputs.build_target == 'vol1' || inputs.build_target == 'all') }}
|
||||
artifact_name: ${{ inputs.target }}-pdf-vol1-windows
|
||||
output_dir: _build/pdf-vol1
|
||||
- platform: windows
|
||||
platform_name: Windows
|
||||
platform_emoji: '🪟'
|
||||
runner: windows-latest
|
||||
format_name: EPUB
|
||||
format_emoji: '📚'
|
||||
volume: vol1
|
||||
config: _quarto-epub-vol1.yml
|
||||
render_target: epub
|
||||
enabled: ${{ inputs.build_windows && inputs.build_epub && (inputs.build_target == 'vol1' || inputs.build_target == 'all') }}
|
||||
artifact_name: ${{ inputs.target }}-epub-vol1-windows
|
||||
output_dir: _build/epub-vol1
|
||||
# =================================================================
|
||||
# Volume II builds (Windows)
|
||||
# =================================================================
|
||||
- platform: windows
|
||||
platform_name: Windows
|
||||
platform_emoji: '🪟'
|
||||
runner: windows-latest
|
||||
format_name: HTML
|
||||
format_emoji: '📄'
|
||||
volume: vol2
|
||||
config: _quarto-html-vol2.yml
|
||||
render_target: html
|
||||
enabled: ${{ inputs.build_windows && inputs.build_html && (inputs.build_target == 'vol2' || inputs.build_target == 'all') }}
|
||||
artifact_name: ${{ inputs.target }}-html-vol2-windows
|
||||
output_dir: _build/html-vol2
|
||||
- platform: windows
|
||||
platform_name: Windows
|
||||
platform_emoji: '🪟'
|
||||
runner: windows-latest
|
||||
format_name: PDF
|
||||
format_emoji: '📑'
|
||||
volume: vol2
|
||||
config: _quarto-pdf-vol2.yml
|
||||
render_target: titlepage-pdf
|
||||
enabled: ${{ inputs.build_windows && inputs.build_pdf && (inputs.build_target == 'vol2' || inputs.build_target == 'all') }}
|
||||
artifact_name: ${{ inputs.target }}-pdf-vol2-windows
|
||||
output_dir: _build/pdf-vol2
|
||||
- platform: windows
|
||||
platform_name: Windows
|
||||
platform_emoji: '🪟'
|
||||
runner: windows-latest
|
||||
format_name: EPUB
|
||||
format_emoji: '📚'
|
||||
volume: vol2
|
||||
config: _quarto-epub-vol2.yml
|
||||
render_target: epub
|
||||
enabled: ${{ inputs.build_windows && inputs.build_epub && (inputs.build_target == 'vol2' || inputs.build_target == 'all') }}
|
||||
artifact_name: ${{ inputs.target }}-epub-vol2-windows
|
||||
output_dir: _build/epub-vol2
|
||||
|
||||
outputs:
|
||||
platform: ${{ matrix.platform }}
|
||||
@@ -471,6 +569,14 @@ jobs:
|
||||
linux_html_vol2_artifact: ${{ steps.collect.outputs.linux_html_vol2_artifact }}
|
||||
linux_pdf_vol2_artifact: ${{ steps.collect.outputs.linux_pdf_vol2_artifact }}
|
||||
linux_epub_vol2_artifact: ${{ steps.collect.outputs.linux_epub_vol2_artifact }}
|
||||
# Windows Volume I artifacts
|
||||
windows_html_vol1_artifact: ${{ steps.collect.outputs.windows_html_vol1_artifact }}
|
||||
windows_pdf_vol1_artifact: ${{ steps.collect.outputs.windows_pdf_vol1_artifact }}
|
||||
windows_epub_vol1_artifact: ${{ steps.collect.outputs.windows_epub_vol1_artifact }}
|
||||
# Windows Volume II artifacts
|
||||
windows_html_vol2_artifact: ${{ steps.collect.outputs.windows_html_vol2_artifact }}
|
||||
windows_pdf_vol2_artifact: ${{ steps.collect.outputs.windows_pdf_vol2_artifact }}
|
||||
windows_epub_vol2_artifact: ${{ steps.collect.outputs.windows_epub_vol2_artifact }}
|
||||
|
||||
steps:
|
||||
- name: 📊 Collect results
|
||||
@@ -537,4 +643,50 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
|
||||
# =================================================================
|
||||
# Windows Volume I artifacts
|
||||
# =================================================================
|
||||
if [[ "$BUILD_TARGET" == "vol1" || "$BUILD_TARGET" == "all" ]]; then
|
||||
if [[ "${{ inputs.build_windows && inputs.build_html }}" == "true" ]]; then
|
||||
ARTIFACT_NAME="${TARGET}-html-vol1-windows"
|
||||
echo "windows_html_vol1_artifact=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
|
||||
echo "📄 Windows HTML artifact (Vol I): $ARTIFACT_NAME"
|
||||
fi
|
||||
|
||||
if [[ "${{ inputs.build_windows && inputs.build_pdf }}" == "true" ]]; then
|
||||
ARTIFACT_NAME="${TARGET}-pdf-vol1-windows"
|
||||
echo "windows_pdf_vol1_artifact=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
|
||||
echo "📑 Windows PDF artifact (Vol I): $ARTIFACT_NAME"
|
||||
fi
|
||||
|
||||
if [[ "${{ inputs.build_windows && inputs.build_epub }}" == "true" ]]; then
|
||||
ARTIFACT_NAME="${TARGET}-epub-vol1-windows"
|
||||
echo "windows_epub_vol1_artifact=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
|
||||
echo "📚 Windows EPUB artifact (Vol I): $ARTIFACT_NAME"
|
||||
fi
|
||||
fi
|
||||
|
||||
# =================================================================
|
||||
# Windows Volume II artifacts
|
||||
# =================================================================
|
||||
if [[ "$BUILD_TARGET" == "vol2" || "$BUILD_TARGET" == "all" ]]; then
|
||||
if [[ "${{ inputs.build_windows && inputs.build_html }}" == "true" ]]; then
|
||||
ARTIFACT_NAME="${TARGET}-html-vol2-windows"
|
||||
echo "windows_html_vol2_artifact=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
|
||||
echo "📄 Windows HTML artifact (Vol II): $ARTIFACT_NAME"
|
||||
fi
|
||||
|
||||
if [[ "${{ inputs.build_windows && inputs.build_pdf }}" == "true" ]]; then
|
||||
ARTIFACT_NAME="${TARGET}-pdf-vol2-windows"
|
||||
echo "windows_pdf_vol2_artifact=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
|
||||
echo "📑 Windows PDF artifact (Vol II): $ARTIFACT_NAME"
|
||||
fi
|
||||
|
||||
if [[ "${{ inputs.build_windows && inputs.build_epub }}" == "true" ]]; then
|
||||
ARTIFACT_NAME="${TARGET}-epub-vol2-windows"
|
||||
echo "windows_epub_vol2_artifact=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
|
||||
echo "📚 Windows EPUB artifact (Vol II): $ARTIFACT_NAME"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "✅ API contract established - Status: $BUILD_SUCCESS_MSG"
|
||||
|
||||
Reference in New Issue
Block a user