From 5d34189cf6cc6e2c130a41d47f40c7f9ed37db47 Mon Sep 17 00:00:00 2001 From: Kwangjin Lee <k.lee-5@student.tudelft.nl> Date: Fri, 29 Nov 2024 14:27:34 +0100 Subject: [PATCH] Update 2 files - /.gitlab-ci.yml - /book/intro.md --- .gitlab-ci.yml | 40 ++++++++++++++++------------------------ book/intro.md | 2 +- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index acb875cc..0cc9cb35 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 181201ce..07dd7122 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. -- GitLab