ci: auto-deploy to Cloudflare on push to main#1
Open
rockitdev wants to merge 1 commit into
Open
Conversation
Adds a GitHub Actions workflow that builds the Astro site and deploys the ./dist Workers static assets via wrangler on every push to main. Fixes the stale-deploy gap: changes were pushed but never shipped because nothing deployed on push. Requires repo secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires auto-deploy so pushes to
mainship automatically. Fixes the stale-deploy gap where July changes were pushed tomainbut never went live (nothing deployed on push).What it does: on every push to
main(and manualworkflow_dispatch), builds the Astro site and runswrangler deployof the./distWorkers static assets.Before merging — add two repo secrets (Settings → Secrets and variables → Actions):
CLOUDFLARE_API_TOKEN— create at Cloudflare → My Profile → API Tokens → use the "Edit Cloudflare Workers" template.CLOUDFLARE_ACCOUNT_ID— from the Cloudflare dashboard (Workers & Pages → account ID in the right sidebar, or the hex in the dashboard URL).Merging this PR triggers the first run, which deploys current
main(all the July changes: The Lab, grade-7 copy, case-study depth) and fixes the live site in one shot.🤖 Generated with Claude Code