This repository contains the source files for the GitHub Pages site.
The index.html file is kept in a readable, formatted state for easy editing.
The site is automatically minified and deployed via GitHub Actions when you push to the main or master branch.
To test the minification locally:
npm install
npm run buildThis will minify index.html in place. Note: Make sure to restore the readable version before committing if you test locally.
The GitHub Actions workflow (.github/workflows/deploy.yml) will:
- Checkout the code
- Install dependencies
- Minify the HTML
- Deploy to the
gh-pagesbranch - Purge Cloudflare cache (if configured)
Setup:
- Configure GitHub Pages to serve from the
gh-pagesbranch in your repository settings (Settings → Pages → Source: Deploy from a branch → Branch: gh-pages). - Cloudflare Cache Purging (Optional): To enable automatic cache purging after deployment, add these secrets to your repository:
CLOUDFLARE_ZONE_ID: Your Cloudflare Zone ID (found in your domain's overview page)CLOUDFLARE_API_TOKEN: A Cloudflare API token with "Zone.Cache Purge" permissions- Go to Settings → Secrets and variables → Actions to add these secrets
If you prefer to serve from the root of your main/master branch, use the alternative workflow:
- Rename
.github/workflows/deploy-root.yml.exampleto.github/workflows/deploy.yml - Delete the current
deploy.yml - The workflow will commit the minified version back to your branch
Note: With Option 2, your readable source will be in git history, but the working tree will have the minified version after deployment.