Skip to content

ci(site): auto-deploy to Cloudflare Pages on main + deployment pruning#161

Merged
dvcdsys merged 1 commit into
mainfrom
chore/site-autodeploy
Jul 19, 2026
Merged

ci(site): auto-deploy to Cloudflare Pages on main + deployment pruning#161
dvcdsys merged 1 commit into
mainfrom
chore/site-autodeploy

Conversation

@dvcdsys

@dvcdsys dvcdsys commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Adds .github/workflows/deploy-site.yml:

  • Trigger: push to main touching site/** (or the workflow itself) + manual workflow_dispatch.
  • Deploy: npm ci && npm run build then npx wrangler pages deploy dist --project-name codeindex --branch main (wrangler is already a site devDependency).
  • Prune: deletes all but the newest 5 Pages deployments via the Cloudflare API (force=true for aliased ones; the live production deployment is protected by the API itself and by being among the newest). Mirrors the deny-by-default retention approach of dockerhub-prune.sh.
  • Graceful skip: until the CLOUDFLARE_API_TOKEN repository secret (Account → Cloudflare Pages → Edit) exists, the job warns and exits green — safe to merge before the secret is configured.

Config change → main-first per repo policy; carry to develop follows as a cherry-pick.

🤖 Generated with Claude Code

…eployments

Push to main touching site/** builds and deploys to the codeindex Pages
project via wrangler, then deletes all but the newest KEEP_DEPLOYMENTS
deployments through the Cloudflare API (wrangler has no delete command).
Skips gracefully with a warning until the CLOUDFLARE_API_TOKEN repository
secret (Account -> Cloudflare Pages -> Edit) is configured.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dvcdsys
dvcdsys merged commit a1849c4 into main Jul 19, 2026
7 checks passed
dvcdsys added a commit that referenced this pull request Jul 19, 2026
chore(develop): carry site auto-deploy workflow from main (#161)
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.

1 participant