Skip to content

Commit

Permalink
Update 2 files
Browse files Browse the repository at this point in the history
- /.gitlab-ci.yml
- /book/intro.md
  • Loading branch information
lkdmc committed Nov 29, 2024
1 parent 93f0e6e commit 5d34189
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 25 deletions.
40 changes: 16 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ before_script:
- virtualenv venv
- source venv/bin/activate
- pip install -r requirements.txt
- pip install teachbooks

build-book:
stage: build
script:
# Previous debug commands remain the same
- echo "Starting build process..."
# Build based on branch
- |
if [ "$CI_COMMIT_BRANCH" == "release" ]; then
echo "Building production version"
Expand All @@ -32,37 +34,27 @@ build-book:
echo "Building draft version"
teachbooks build book/ > >(tee stdout.log) 2> >(tee stderr.log >&2)
fi
# Cleanup steps
- echo "Directory sizes before cleanup:" | tee -a build_debug.log
- du -sh book/_build/* | tee -a build_debug.log
- echo "Cleaning up build artifacts..."
- rm -rf book/_build/.doctrees
# - rm -rf book/_build/jupyter_execute
# - find book/_build -name "*.ipynb" -delete
# - find book/_build -name "__pycache__" -exec rm -rf {} +
# - find book/_build -name "*.pyc" -delete
# Keep debug output
- echo "Final directory sizes after cleanup:" | tee -a build_debug.log
- du -sh book/_build/* | tee -a build_debug.log
# Check build size
- echo "Calculating build size..."
- SIZE=$(du -sk book/_build/html | cut -f1)
- echo "Build size is ${SIZE}KB"
- echo $CI_JOB_ID > build_job_id.txt

- echo "Directory sizes after build:"
- du -sh book/_build/*
- echo "Build completed"

artifacts:
when: on_success
paths:
- book/_build/html/**
# - book/_build/html/**/*.html
# - book/_build/html/**/*.css
# - book/_build/html/**/*.js
# - book/_build/html/_images/**/*
# - book/_build/html/_static/**/*.{css,js,woff,woff2,ttf}
- book/_build/jupyter_execute/**
- stdout.log
- stderr.log
- build_job_id.txt
- build_debug.log
# exclude:
# - book/_build/html/**/*.ipynb
# - book/_build/html/**/__pycache__/
# - book/_build/html/**/*.doctree
# - book/_build/html/**/*.pickle
expire_in: 1 week

rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "release"
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "release"
Expand Down
2 changes: 1 addition & 1 deletion book/intro.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Welcome to the MUDE Textbook test
# Welcome to the MUDE Textbook

Welcome to the MUDE textbook for the 2024-25 academic year. This is where assigned reading is located, along with interactive exercises to practice and study the module material.

Expand Down

0 comments on commit 5d34189

Please sign in to comment.