Automated production deployments using versioned and rollback tags
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.
on:
push:
tags:
- 'v*'
- 'rollback-*'
- 'hotfix-*'
Each tag deploys the code to the main branch in Cloudflare Pages as production.
git checkout v10
git tag rollback-v10
git push --tags
This re-deploys the code from tag v10 to production using rollback-v10.
Create a token from Cloudflare API Tokens and add it as a GitHub secret named CLOUDFLARE_API_TOKEN.