Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build & deploy Jupyter Book
on:
push:
branches: [main]
workflow_dispatch: # Allows manual trigger from GitHub UI

permissions:
contents: read
Expand All @@ -21,21 +22,25 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.12'

- name: Install deps
run: |
pip install -U jupyter-book
# optional: project-specific deps
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements.txt
# Install modules-specific dependencies if they exist
if [ -f modules/requirements.txt ]; then pip install -r modules/requirements.txt; fi

- name: Build the book
run: jupyter-book build modules --path-output _site
run: |
cd modules
set -e
jupyter book build --html || jupyter-book build --html
[ -d "_build/site" ] && cp -r _build/site _build/html || [ -d "_build/html" ]

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site/_build/html/
path: ./modules/_build/html

deploy:
needs: build
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test Build (PRs)

# This workflow only builds the book to verify it works, but doesn't deploy
# Useful for testing changes in pull requests

on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install deps
run: |
pip install -r requirements.txt
# Install modules-specific dependencies if they exist
if [ -f modules/requirements.txt ]; then pip install -r modules/requirements.txt; fi

- name: Build the book
run: |
cd modules
set -e
jupyter book build --html || jupyter-book build --html

- name: Determine build output path
id: build_path
run: |
cd modules
if [ -d "_build/html" ]; then
echo "path=./modules/_build/html" >> $GITHUB_OUTPUT
elif [ -d "_build/site" ]; then
echo "path=./modules/_build/site" >> $GITHUB_OUTPUT
else
echo "ERROR: No build output found" && exit 1
fi

- name: Upload artifact (for inspection)
uses: actions/upload-pages-artifact@v3
with:
path: ${{ steps.build_path.outputs.path }}
retention-days: 1 # Keep artifact for 1 day only

87 changes: 87 additions & 0 deletions modules/myst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
version: 1

project:
title: El Camino College Showcase
authors:
- name: Jonathan Ferrari
- name: Edwin Vargas Navarro
github: ds-modules/ecc-textbook
bibliography:
- references.bib
jupyter: true
execute:
execute_notebooks: 'off'
exports:
- format: pdf
template: plain_latex_book
output: exports/book.pdf
toc:
- file: intro.md
- title: Biology
children:
- file: ecc-biology/Cancer_Mutations/cancer_mutations.md
- file: ecc-biology/Introduction/introduction.md
- file: ecc-biology/enzymes/enzymes_bioinformatics.md
- file: ecc-biology/polarity/bond_polarity.md
- title: Business
children:
- file: ecc-business/marketing-fast-food/marketing_case_study.md
- file: ecc-business/sba/sba.md
- title: Calculus
children:
- file: ecc-calculus/partial_fractions_lesson.md
- file: ecc-calculus/pfd.md
- file: ecc-calculus/riemann_sum.md
- file: ecc-calculus/sums.md
- title: Chemistry
children:
- file: ecc-chemistry/Orbitals.md
- title: Child Development
children:
- file: ecc-child-development/parental-risk.md
- title: CS 9
children:
- file: ecc-cs9/ECC CalEnviroScreen.md
- file: ecc-cs9/Modeling_CA_Housing_lab.md
- file: ecc-cs9/ces/nb-archive/CES1-intro.md
- file: ecc-cs9/ces/nb-archive/CES2-CommColl.md
- file: ecc-cs9/ces/nb-archive/CES_Mapping.md
- file: ecc-cs9/ces/proj1/proj1.md
- file: ecc-cs9/ces/proj2.md
- file: ecc-cs9/policing/policing.md
- title: Ethnic Studies
children:
- file: ecc-ethnic-studies/Incarceration/Incarcerations.md
- file: ecc-ethnic-studies/Incarceration/otter.md
- file: ecc-ethnic-studies/introduction/introduction.md
- file: ecc-ethnic-studies/race-and-health/Health.md
- title: Sociology
children:
- file: ecc-sociology/Incarcerations/Incarcerations.md
- file: ecc-sociology/environment/environmental-justice.md
- file: ecc-sociology/introduction/introduction.md
- file: ecc-sociology/race-and-health/Health.md
- title: Statistics
children:
- file: ecc-statistics/anova/anova.md
- file: ecc-statistics/data_representation/Data-Rep-Module.md
- file: ecc-statistics/probability_distribution/Probability-Distributions.md
- file: ecc-statistics/sampling_distribution/sampling_distribution.md

site:
template: book-theme
actions:
- title: Open Issue
url: https://github.com/ds-modules/ecc-textbook/issues/new
options:
logo: _static/ds.svg
favicon: _static/favicon.ico
logo_text: El Camino College Showcase
extra_css:
- _static/custom.css
navigation_with_keys: true
show_toc_level: 2
show_navbar_depth: 2
use_issues_button: true
use_repository_button: true

11 changes: 3 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
jupyter-book==1.0.3
quantecon-book-theme==0.8.3
sphinx-tojupyter==0.3.0
sphinxext-rediraffe==0.2.7
sphinx-exercise==1.0.1
ghp-import==2.1.0
sphinxcontrib-youtube==1.3.0
sphinx-togglebutton==0.3.2
jupyter-book==2.0.2
mystmd
ghp-import==2.1.0