Cloudflare Pages Deployment via GitHub Tags

Automated production deployments using versioned and rollback tags

📦 How it works

When a tag is pushed to GitHub (like v*, rollback-*, or hotfix-*), GitHub Actions runs a workflow to deploy static files from ./public to Cloudflare Pages in the production branch.

🚀 GitHub Actions Workflow

on:
  push:
    tags:
      - 'v*'
      - 'rollback-*'
      - 'hotfix-*'

Each tag deploys the code to the main branch in Cloudflare Pages as production.

✅ Currently Deployed Tags

v12 hotfix-v12 rollback-v10

🧯 Rollback Example

git checkout v10
git tag rollback-v10
git push --tags

This re-deploys the code from tag v10 to production using rollback-v10.

🔐 API Token Setup

Create a token from Cloudflare API Tokens and add it as a GitHub secret named CLOUDFLARE_API_TOKEN.