Files
cs249r_book/tinytorch/scripts/build-docs.sh
Vijay Janapa Reddi c602f97364 feat: integrate TinyTorch into MLSysBook repository
TinyTorch educational deep learning framework now lives at tinytorch/

Structure:
- tinytorch/src/         - Source modules (single source of truth)
- tinytorch/tito/        - CLI tool
- tinytorch/tests/       - Test suite
- tinytorch/site/        - Jupyter Book website
- tinytorch/milestones/  - Historical ML implementations
- tinytorch/datasets/    - Educational datasets (tinydigits, tinytalks)
- tinytorch/assignments/ - NBGrader assignments
- tinytorch/instructor/  - Teaching materials

Workflows (with tinytorch- prefix):
- tinytorch-ci.yml           - CI/CD pipeline
- tinytorch-publish-dev.yml  - Dev site deployment
- tinytorch-publish-live.yml - Live site deployment
- tinytorch-build-pdf.yml    - PDF generation
- tinytorch-release-check.yml - Release validation

Repository Variables added:
- TINYTORCH_ROOT  = tinytorch
- TINYTORCH_SRC   = tinytorch/src
- TINYTORCH_SITE  = tinytorch/site
- TINYTORCH_TESTS = tinytorch/tests

All workflows use \${{ vars.TINYTORCH_* }} for path configuration.

Note: tinytorch/site/_static/favicon.svg kept as SVG (valid for favicons)
2025-12-05 19:23:18 -08:00

37 lines
1.1 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Build website documentation (static site)
# Usage: ./scripts/build-docs.sh
set -e # Exit on error
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${BLUE}🌐 Building TinyTorch website documentation...${NC}"
# Check if docs/_build exists
if [ ! -d "docs/_build" ]; then
echo -e "${YELLOW}⚠️ No book build found. Building Jupyter Book first...${NC}"
./scripts/build-book.sh
fi
# Generate static assets
echo -e "${BLUE}📦 Generating static assets...${NC}"
# Copy static files to website directory (customize as needed)
if [ -d "website" ]; then
echo -e "${BLUE}📋 Copying book output to website/...${NC}"
mkdir -p website/docs
cp -r docs/_build/html/* website/docs/
echo -e "${GREEN}✅ Documentation copied to website/docs/${NC}"
else
echo -e "${YELLOW} No website/ directory found.${NC}"
echo -e "${YELLOW} Book output is in: docs/_build/html/${NC}"
fi
echo -e "${GREEN}✅ Documentation build complete!${NC}"
echo -e "${BLUE}📖 View at: docs/_build/html/index.html${NC}"