GitHub / GitHub Pages
GitHub Pages
Section titled “GitHub Pages”GitHub Pages serves static HTML files from a repository. Since it doesn’t support server-side code execution, you cannot intercept requests at the server level.
However, there are two integration paths depending on your setup.
Option 1: Cloudflare in Front of GitHub Pages
Section titled “Option 1: Cloudflare in Front of GitHub Pages”The recommended approach is to proxy GitHub Pages through Cloudflare:
- Point your domain’s DNS to Cloudflare (not directly to GitHub Pages)
- In Cloudflare DNS, set your
AorCNAMErecord pointing to GitHub Pages with Proxied mode (orange cloud) - Add a Cloudflare Worker using the Cloudflare Workers integration
This way:
- Your static files are still hosted on GitHub Pages
- Cloudflare intercepts all requests before they reach GitHub
- Bots are sent to SeoRend; regular users go straight to GitHub Pages
Bot → Cloudflare Worker → SeoRend → HTMLUser → Cloudflare Worker → GitHub PagesOption 2: Migrate to a Server Platform
Section titled “Option 2: Migrate to a Server Platform”If your project is a JavaScript SPA (React, Vue, Angular), consider moving to a platform that supports server-side middleware:
| Platform | Integration |
|---|---|
| Vercel | Vercel Edge Middleware |
| Netlify | Netlify Edge Functions |
| Heroku | Heroku / Node.js |
| Self-hosted | NGINX + Node.js |
GitHub Actions
Section titled “GitHub Actions”You can use GitHub Actions to automate SeoRend-related tasks:
Warm Cache After Deploy
Section titled “Warm Cache After Deploy”Trigger a cache warm for your important pages after every production deployment:
name: Warm SeoRend Cache
on: deployment_status:
jobs: warm: if: github.event.deployment_status.state == 'success' runs-on: ubuntu-latest steps: - name: Warm important pages run: | PAGES=( "https://example.com/" "https://example.com/pricing" "https://example.com/features" "https://example.com/about" )
for url in "${PAGES[@]}"; do echo "Warming: $url" curl -s -X POST https://render.seorend.com/v1/render \ -H "Authorization: Bearer ${{ secrets.SEOREND_API_KEY }}" \ -H "Content-Type: application/json" \ -d "{\"url\":\"$url\",\"userAgent\":\"Googlebot/2.1\"}" \ | jq -r '" cache: \(.cache.hit), time: \(.timings.total_ms)ms"' done env: SEOREND_API_KEY: ${{ secrets.SEOREND_API_KEY }}Add to GitHub Secrets
Section titled “Add to GitHub Secrets”In your repository:
- Go to Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
SEOREND_API_KEY, Value: your SeoRend API key
Test Integration in CI
Section titled “Test Integration in CI”Add a smoke test to verify SeoRend returns content:
- name: Test SeoRend integration run: | RESPONSE=$(curl -s -A "Googlebot/2.1" -I https://example.com/) if echo "$RESPONSE" | grep -q "x-seorend-cache"; then echo "✓ SeoRend is working" else echo "✗ SeoRend headers not found" exit 1 fiSummary
Section titled “Summary”| Use Case | Recommendation |
|---|---|
| GitHub Pages SPA | Use Cloudflare proxy → Cloudflare integration |
| GitHub Actions CI/CD | Warm cache after deploy (see workflow above) |
| GitHub + Vercel | Use Vercel middleware |
| GitHub + Netlify | Use Netlify edge functions |