📚 Update documentation for enhanced binder CLI

- Update BINDER.md with publish command and about command
- Update DEVELOPMENT.md with new build workflow
- Update tools/scripts/README.md to reference binder
- Update main README.md with publishing section
This commit is contained in:
Vijay Janapa Reddi
2025-08-01 13:36:21 -04:00
parent e3b0eff67c
commit 13e370ebde
4 changed files with 125 additions and 10 deletions

View File

@@ -253,6 +253,16 @@ MLSysBook/
- [🔨 Build Instructions](docs/BUILD.md) — Detailed build process
- [🤝 Contribution Guidelines](docs/contribute.md) — How to contribute effectively
### Publishing
```bash
# Quick publish (recommended)
./binder publish
# Manual steps
./binder build - html && ./binder build - pdf
# Then copy PDF to assets and push to main
```
---
## 📋 Citation & License

View File

@@ -52,6 +52,7 @@ Full builds render the complete book with all chapters, parts, and cross-referen
|---------|-------------|---------|
| `build * <format>` | Build complete book | `./binder build * pdf` |
| `preview-full` | Preview complete book | `./binder preview-full` |
| `publish` | Build and publish book | `./binder publish` |
### 🔧 Management Commands
@@ -73,6 +74,7 @@ All commands have single-letter shortcuts:
| `b` | `build` |
| `p` | `preview` |
| `pf` | `preview-full` |
| `pub` | `publish` |
| `c` | `clean` |
| `ch` | `check` |
| `s` | `switch` |
@@ -99,6 +101,47 @@ Use `./binder list` to see all available chapters.
| HTML | `build/html/` | Website format with navigation |
| PDF | `build/pdf/` | Academic book format |
## 🚀 Publishing
The `publish` command handles the complete publication workflow:
```bash
# Publish the book (build + deploy)
./binder publish
```
### What `publish` does:
1. **🔍 Pre-flight checks** - Verifies git status and branch
2. **🧹 Cleans** - Removes previous builds
3. **📚 Builds HTML** - Creates web version
4. **📄 Builds PDF** - Creates downloadable version
5. **📦 Copies PDF** - Moves PDF to assets directory
6. **💾 Commits** - Adds PDF to git
7. **🚀 Pushes** - Triggers GitHub Actions deployment
### Publishing Workflow:
```bash
# Development workflow
./binder preview intro # Preview a chapter
./binder build - html # Build complete HTML
./binder build - pdf # Build complete PDF
./binder publish # Publish to the world
```
### After Publishing:
- **🌐 Web version**: Available at https://harvard-edge.github.io/cs249r_book
- **📄 PDF download**: Available at https://harvard-edge.github.io/cs249r_book/assets/Machine-Learning-Systems.pdf
- **📈 GitHub Actions**: Monitors build progress at https://github.com/harvard-edge/cs249r_book/actions
### Requirements:
- Must be on `main` branch
- No uncommitted changes
- Git repository properly configured
## Advanced Features
### Unified Multi-Chapter Builds

View File

@@ -68,17 +68,28 @@ git commit --no-verify -m "Emergency commit"
### Build Commands
```bash
# HTML version (fast, for development)
make build
cd book && quarto render --to html
# Using binder (recommended)
./binder build - html # Build HTML version
./binder build - pdf # Build PDF version
./binder publish # Build and publish
# PDF version (slower, for publication)
make build-pdf
cd book && quarto render --to titlepage-pdf
# Using make (legacy)
make build # HTML version
make build-pdf # PDF version
make build-all # All formats
```
# All formats
make build-all
cd book && quarto render
### Development Workflow
```bash
# Preview a chapter (fastest)
./binder preview intro
# Build complete book
./binder build - html
# Publish to the world
./binder publish
```
### Development Server
@@ -98,6 +109,54 @@ cd book && quarto preview
- **PDF**: `book/index.pdf` (in book directory)
- **Artifacts**: Automatically cleaned by git hooks
## 🚀 Publishing
### Quick Publish
```bash
# One command to publish everything
./binder publish
```
### Manual Publishing Steps
If you prefer to do it step by step:
```bash
# 1. Ensure you're on main branch
git checkout main
git merge dev
# 2. Build both formats
./binder build - html
./binder build - pdf
# 3. Copy PDF to assets
cp build/pdf/Machine-Learning-Systems.pdf assets/
# 4. Commit and push
git add assets/Machine-Learning-Systems.pdf
git commit -m "Add PDF to assets"
git push origin main
```
### Publishing Requirements
- ✅ Must be on `main` branch
- ✅ No uncommitted changes
- ✅ All builds successful
- ✅ Git repository properly configured
### After Publishing
The GitHub Actions workflow will:
- 🔄 Run quality checks
- 🏗️ Build all formats (Linux + Windows)
- 🚀 Deploy to GitHub Pages
- 📦 Create release assets
**Monitor progress**: https://github.com/harvard-edge/cs249r_book/actions
## 🔍 Project Health Checks
### Quick Status Check

View File

@@ -140,7 +140,7 @@ Tools for AI-powered content generation and enhancement.
Advanced cross-reference management and validation tools.
### Publishing (`quarto_publish/`)
Scripts for publishing and deployment workflows.
Scripts for publishing and deployment workflows. **Note**: The main publishing workflow is now handled by `./binder publish`.
### AI Menu (`ai_menu/`)
AI-powered menu and interface tools.
@@ -192,6 +192,9 @@ python maintenance/update_changelog.py
# Final cleanup
./build/clean.sh
# Publish (using binder)
./binder publish
```
## 📋 Script Categories Summary