Skip to content

Cloudflare Workers configuration#1232

Merged
dianellasy merged 20 commits into
acmcsufoss:mainfrom
TheJolman:devops/cloudflare
Jan 11, 2026
Merged

Cloudflare Workers configuration#1232
dianellasy merged 20 commits into
acmcsufoss:mainfrom
TheJolman:devops/cloudflare

Conversation

@TheJolman
Copy link
Copy Markdown
Collaborator

@TheJolman TheJolman commented Jan 5, 2026

See live: https://acmcsuf-com.acm-csuf9.workers.dev/

This PR adds a support for deploying to Cloudflare from the CLI using wrangler.

To use:

Run npm run deploy

Strategy:

We probably don't want to merge this here while it's still on Ethan's account, as changing svelte's adapter-auto to adapter-cloudflare might mess things up on Netlify. However, I do have a plan (should have zero downtime):

  1. Use wrangler to deploy to the shared acmCSUF cloudflare account (done ✔)
    a. Fix any bugs that crop up on new deployment
  2. Change the DNS records to point towards the new Cloudflare instance
  3. Ethan transfers the repository to the org (old Netlify build should stay up)
  4. Set up Cloudflare's Git integration with org repo to get automatic new deployments when main gets new changes.
  5. Delete netlify.toml and any other Netlify artifacts

Note that the following build time vars need to be set of Cloudflare's dash for the project to build in CI:

GH_ACCESS_TOKEN=
GH_DISCUSSION_CATEGORY_ID=
GCAL_API_KEY=
GCAL_ID=
GDRIVE_GALLERY_API_KEY=
GDRIVE_GALLERY_FOLDER_ID=
DEBUG_FLAG_ENABLED=

This PR is marked as a draft not because it's not ready, but because of the above strategy where we should wait to merge it until the repo is moved.

@EthanThatOneKid


No longer a Draft / Ready for merge

This PR is now ready for merge.

  • new deploy and preview scripts allow a dev with sufficient permissions to deploy live environments to our production URL or to a preview workers.dev URL
  • removed all references to Netlify and the old location of the repo
  • npm run dev now uses wrangler dev instead of vite dev. This ensures that your local dev environment matches the prod environment.

There's also a cloudflare vite plugin that would allow us to continue to use vite dev, but it comes with some of its own caveats. Look into it if you're curious.

  • added a few new things to the .gitignore file

What's Next?

We need to install the Cloudflare git integration on this repo to maintain the nice experience of new deployments going live on merge to main.

I'll create issues for the things in the below comment that never got resolved. These need to be fixed before the semester starts.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 5, 2026

👷 Deploy request for acmcsuf pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 99d2cb8

@TheJolman
Copy link
Copy Markdown
Collaborator Author

Issues with Cloudflare deployment found so far:

  • /colors has a 404
  • Missing recent blog posts

@EthanThatOneKid
Copy link
Copy Markdown
Collaborator

Shout out to @TheJolman for spearheading this initiative :)

/colors has a 404

I believe /branding works as an alternative to /colors.

Missing recent blog posts

Might have something to do with required env vars population.

https://github.com/EthanThatOneKid/acmcsuf.com/blob/d862b80e1d037ab5508473eff7e8c54e0f02ddc9/src/lib/server/blog/posts.ts#L1

@TheJolman TheJolman marked this pull request as ready for review January 11, 2026 17:46
@dianellasy dianellasy self-requested a review January 11, 2026 18:52
Copy link
Copy Markdown
Collaborator

@dianellasy dianellasy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for your hard work Josh!

@dianellasy dianellasy merged commit 8182900 into acmcsufoss:main Jan 11, 2026
3 checks passed
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.

3 participants