This project includes automated tile generation that runs monthly via GitHub Actions to keep your OSRS map tiles up-to-date with the latest game cache.
- Schedule: Runs on the 1st of every month at 2:00 AM UTC
- Process: Downloads latest OSRS cache → Generates tiles → Commits changes
- Smart Updates: Only regenerates if tiles are older than 30 days or missing
You can manually trigger tile generation anytime:
- Go to your repository on GitHub
- Navigate to Actions tab
- Select Generate OSRS Tiles workflow
- Click Run workflow
- Optionally check "Force regenerate all tiles" to rebuild everything
- ✅ Ubuntu runner with Node.js 18, Java 11, Python 3.9
- ✅ Installs system dependencies (libvips, build tools)
- ✅ Installs project dependencies (npm, pip, gradle)
- 🔍 Checks if tiles exist and are recent (< 30 days old)
- 🔍 Skips generation if tiles are up-to-date (saves resources)
- 🔍 Forces regeneration if manually requested
npm run clean # Remove old tiles and cache
npm run build:with-tiles # Generate new tiles + build app- 📝 Commits new tiles with descriptive message
- 📝 Includes tile count and generation reason
- 📝 Pushes changes back to repository
- 📝 Only commits if there are actual changes
# Clean and generate tiles
npm run clean
npm run build:with-tiles
# Or just generate tiles without building
./scripts/generate-tiles.sh# Clean everything
npm run clean
# Build with fresh tiles
npm run build:with-tiles
# Regular build (uses existing tiles)
npm run build- View workflow runs in the Actions tab
- Each run shows detailed logs and summaries
- Failed runs upload tiles as artifacts for debugging
Each run creates a summary showing:
- ✅ Generation status and reason
- 📈 Number of tiles generated
- 💾 Total file size
- 🔄 Git commit status
Edit .github/workflows/generate-tiles.yml to change the schedule:
schedule:
# Run on the 15th of every month at 3:00 AM UTC
- cron: '0 3 15 * *'The workflow has a 2-hour timeout. Adjust if needed:
timeout-minutes: 120 # 2 hoursNode.js memory is increased for tile processing:
env:
NODE_OPTIONS: '--max-old-space-size=4096' # 4GBWorkflow fails with memory errors:
- Increase
NODE_OPTIONSmemory limit - Consider splitting tile generation into smaller batches
Tiles not updating:
- Check if workflow is enabled in repository settings
- Verify the cron schedule syntax
- Manually trigger to test
Build fails after tile generation:
- Check if
public/tiles/directory structure is correct - Verify tile files are valid PNG format
- Check Next.js build logs for specific errors
- Check workflow logs in GitHub Actions
- Download failed run artifacts (if available)
- Run tile generation locally to reproduce issues
- Check system dependencies and versions
After successful generation:
public/tiles/
├── 0/ # Plane 0 (surface)
│ ├── 3/ # Zoom level 3
│ ├── 4/ # Zoom level 4
│ └── ... # Up to zoom level 11
├── 1/ # Plane 1 (underground)
├── 2/ # Plane 2 (sky level 1)
└── 3/ # Plane 3 (sky level 2)
- Uses
GITHUB_TOKENfor repository access (automatically provided) - No additional secrets required
- Commits are made by "GitHub Action" user
- All operations are logged and auditable
- 🔄 Always Up-to-Date: Tiles automatically refresh monthly
- 💰 Cost Effective: Only regenerates when needed
- 🛡️ Reliable: Robust error handling and recovery
- 📊 Transparent: Full logging and status reporting
- 🚀 Zero Maintenance: Set it and forget it
Your OSRS map will now stay current with the latest game updates automatically! 🎉