diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index acb875cc072fe1ffa7691989f18015c1bb628eb7..0cc9cb353be4825789dee29168b1af74cfbccfd6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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" @@ -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" diff --git a/book/intro.md b/book/intro.md index 181201cef448445fd2543a3216b6a5532c3b3d67..07dd7122999c2e27a885694bf7d309b8294ea57a 100644 --- a/book/intro.md +++ b/book/intro.md @@ -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.