File tree Expand file tree Collapse file tree 3 files changed +26
-15
lines changed
Expand file tree Collapse file tree 3 files changed +26
-15
lines changed Original file line number Diff line number Diff line change 2626
2727 - name : 🔧 Build & Test
2828 run : |
29- # Convert human-readable Geojson file into computer-friendly one
30- bundle exec rake compact_geojson
29+ # Jekyll plugin automatically runs upsert_dojos_geojson, compact_geojson, and cache_dojo_logos
3130 JEKYLL_ENV=production bundle exec jekyll build
3231 JEKYLL_ENV=production bundle exec jekyll doctor
3332 SKIP_BUILD=true bundle exec rake test
Original file line number Diff line number Diff line change @@ -51,14 +51,16 @@ jobs:
5151 run : |
5252 bundle exec rake get_data_from_japan
5353
54- - name : ☯️ Cache dojo logos in Japan
54+ - name : 🔧 Build data to render DojoMap
5555 run : |
56- bundle exec rake cache_dojo_logos
56+ # Jekyll plugin automatically runs cache_dojo_logos, upsert_dojos_geojson, and compact_geojson
57+ JEKYLL_ENV=production bundle exec jekyll build
5758
58- - name : 📍 Generate DojoMap from Earth/Japan data
59+ - name : ✅ Test
5960 run : |
60- bundle exec rake upsert_dojos_geojson
61- bundle exec rake compact_geojson
61+ # _site is already built in previous step
62+ JEKYLL_ENV=production bundle exec jekyll doctor
63+ SKIP_BUILD=true bundle exec rake test
6264
6365 - name : 🆙 Commit latest data to update DojoMap (if any)
6466 run : |
8789 env :
8890 GITHUB_TOKEN :
8991
90- - name : 🔧 Build & Test
91- run : |
92- # Convert human-readable Geojson file into computer-friendly one
93- bundle exec rake compact_geojson
94- JEKYLL_ENV=production bundle exec jekyll build
95- JEKYLL_ENV=production bundle exec jekyll doctor
96- SKIP_BUILD=true bundle exec rake test
97-
9892 # This is NOT for security reason but for others, especially who fork,
9993 # to easier find out which API key they need to replace with their own.
10094 # Check out the official tutorial for details: https://docs.geolonia.com/tutorial
Original file line number Diff line number Diff line change 1+ # Pre-build tasks that run before Jekyll builds the site
2+ Jekyll ::Hooks . register :site , :after_init do |site |
3+ puts "🔄 Running pre-build tasks..."
4+
5+ # Update GeoJSON data
6+ puts " → Updating dojos.geojson..."
7+ system ( 'bundle exec rake upsert_dojos_geojson' )
8+
9+ # Compact GeoJSON for production
10+ puts " → Creating dojos.min.geojson..."
11+ system ( 'bundle exec rake compact_geojson' )
12+
13+ # Cache dojo logos
14+ puts " → Caching dojo logos..."
15+ system ( 'bundle exec rake cache_dojo_logos' )
16+
17+ puts "✅ Pre-build tasks completed"
18+ end
You can’t perform that action at this time.
0 commit comments