Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Book
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MUDE
Book
Commits
b2ab56f5
Commit
b2ab56f5
authored
3 months ago
by
Kwangjin Lee
Browse files
Options
Downloads
Patches
Plain Diff
Test if the website works correctly with these exclusions + check sizes
parent
4464525f
No related branches found
Branches containing commit
No related tags found
1 merge request
!407
Update 2 files
Pipeline
#260196
failed
3 months ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+48
-22
48 additions, 22 deletions
.gitlab-ci.yml
with
48 additions
and
22 deletions
.gitlab-ci.yml
+
48
−
22
View file @
b2ab56f5
...
...
@@ -24,7 +24,7 @@ before_script:
build-book
:
stage
:
build
script
:
#
Build logic remains same
#
Previous build steps...
-
|
if [ "$CI_COMMIT_BRANCH" == "release" ]; then
echo "Building production version"
...
...
@@ -34,48 +34,74 @@ build-book:
teachbooks build book/ > >(tee stdout.log) 2> >(tee stderr.log >&2)
fi
# Size debugging
-
echo "Initial directory sizes:"
-
du -sh book/_build/* | tee build_debug.log
-
echo "Files larger than 5MB:"
-
find book/_build -type f -size +5M -exec ls -lh {} \; >> build_debug.log
# Size analysis
-
echo "=== Size Analysis ===" | tee size_analysis.log
-
echo "Directory Sizes:" | tee -a size_analysis.log
-
du -sh book/_build/* | tee -a size_analysis.log
-
echo -e "\nSize by File Type:" | tee -a size_analysis.log
-
echo "HTML files:" | tee -a size_analysis.log
-
find book/_build/html -name "*.html" -type f -exec du -ch {} + | grep total$ | tee -a size_analysis.log
-
echo "JavaScript files:" | tee -a size_analysis.log
-
find book/_build/html -name "*.js" -type f -exec du -ch {} + | grep total$ | tee -a size_analysis.log
-
echo "CSS files:" | tee -a size_analysis.log
-
find book/_build/html -name "*.css" -type f -exec du -ch {} + | grep total$ | tee -a size_analysis.log
-
echo "Map files:" | tee -a size_analysis.log
-
find book/_build/html -name "*.map" -type f -exec du -ch {} + | grep total$ | tee -a size_analysis.log
-
echo -e "\nLargest Files (>1MB):" | tee -a size_analysis.log
-
find book/_build -type f -size +1M -exec ls -lh {} \; | sort -k5 -hr | tee -a size_analysis.log
-
echo -e "\nFile counts by type:" | tee -a size_analysis.log
-
echo "HTML
:
$(find book/_build/html -name '*.html' | wc -l)" | tee -a size_analysis.log
-
echo "JS
:
$(find book/_build/html -name '*.js' | wc -l)" | tee -a size_analysis.log
-
echo "CSS
:
$(find book/_build/html -name '*.css' | wc -l)" | tee -a size_analysis.log
-
echo "Images
:
$(find book/_build/html/_images -type f | wc -l)" | tee -a size_analysis.log
-
echo "IPython Notebooks
:
$(find book/_build -name '*.ipynb' | wc -l)" | tee -a size_analysis.log
-
echo $CI_JOB_ID > build_job_id.txt
artifacts
:
paths
:
# HTML and static content
-
book/_build/html/**/*.html
-
book/_build/html/**/*.css
-
book/_build/html/**/*.js
# Essential web content
-
book/_build/html/**/*.{html,css,js}
-
book/_build/html/_images/**
-
book/_build/html/_static/**
-
book/_build/html/_custom_downloads/**
-
book/_build/html/genindex.html
-
book/_build/html/search.html
# Keep core JavaScript functionality
-
book/_build/html/_static/index.js
-
book/_build/html/_static/jquery.js
-
book/_build/html/_static/underscore.js
# Required for interactive features
-
book/_build/jupyter_execute/**/*.html
-
book/_build/html/_static/scripts/**
# Build logs and ID
-
book/_build/*.log
# Logs and build info
-
build_job_id.txt
-
build_debug.log
-
stdout.log
-
stderr.log
exclude
:
#
Large unnecessary
files
#
Development/build
files
-
"
**/*.js.map"
-
"
**/*.doctree"
-
"
**/*.ipynb"
-
"
**/_sources/**"
# Build artifacts
-
"
**/__pycache__/**"
-
"
**/*.pyc"
-
"
**/*.pickle"
-
book/_build/.doctrees/**
-
book/_build/jupyter_cache/**
-
"
**/*.pickle"
# Keep notebooks for interactive features
# - "**/*.ipynb"
# # Build artifacts
# - "**/__pycache__/**"
# - "**/*.pyc"
# - book/_build/.doctrees/**
# - book/_build/jupyter_cache/**
# - "**/*.pickle"
expire_in
:
1 week
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment