Fix GitHub workflow to properly activate virtual environment

- Combine venv setup and tito execution in same step
- Add pytest installation for tito environment validation
- Add explanatory comments about GitHub Actions shell behavior
- Remove environment skipping hack in favor of proper setup
- Workflow now uses tito CLI consistently for book generation
This commit is contained in:
Vijay Janapa Reddi
2025-07-15 23:26:34 -04:00
parent 3fecb39065
commit 4f052f5914
2 changed files with 10 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
name: Deploy TinyTorch Jupyter Book (Streamlined)
name: Deploy TinyTorch Jupyter Book (Streamlined with tito)
# Trigger the workflow on push to main branch (publishing) or manual dispatch
# This workflow uses tito CLI for consistent book generation and building
on:
push:
branches: [ main ]
@@ -48,10 +49,17 @@ jobs:
pip install --upgrade pip
pip install jupyter-book jupytext
pip install -r book/requirements.txt
pip install -r requirements.txt # Install main project dependencies
pip install -e . # Install tito CLI
- name: Generate content and build book
run: |
# Set up virtual environment and run tito in same step
# Note: Each GitHub Actions step runs in a separate shell,
# so we need to activate the venv in the same step as tito
python -m venv .venv
source .venv/bin/activate
pip install pytest # Install missing dependency for tito environment checks
# Use tito to generate content and build book
tito book build