Skip to content

Conversation

@zeke
Copy link
Member

@zeke zeke commented Sep 21, 2025

This PR converts the dynamic Express.js thesaurus application into a static site that can be deployed to GitHub Pages for free, eliminating server hosting costs.

Changes

  • Add build script using Puppeteer to scrape all thesaurus pages into static HTML
  • Set up GitHub Actions workflow for automated deployment
  • Add support for 25,000+ word pages with proper URL routing
  • Maintain all existing functionality while enabling static hosting

Testing locally

gh repo clone words/moby
cd moby
gh pr checkout feat/static-site-generation
npm install
npm run build  # Generates static site in ./dist

Prompts

this is a dynamic web server that costs too much money to run. let's convert it into a static website by adding a build step that scrapes the whole site into a directory. publish that directory using github pages and a github actions workflow.

remove the doc about the change. run the build script. gitignore the build script. create a branch. push it. create a pr. open it.

zeke and others added 5 commits September 21, 2025 15:13
This PR converts the dynamic Express.js thesaurus application into a static site that can be deployed to GitHub Pages for free.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add workflow_dispatch for manual triggering
- Increase timeout to 60 minutes for large build
- Optimize Puppeteer with faster page loads and CI flags
- Reduce progress logging frequency (every 500 vs 100 pages)
- Use domcontentloaded instead of networkidle0 for speed
- Block CSS/images/fonts during scraping for faster builds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Ensures build completes successfully for 25k+ pages even in worst case

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Resolves npm ci sync error in GitHub Actions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Removes PR trigger to avoid expensive builds on every PR

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@zeke zeke merged commit 2026e60 into master Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants