Skip to content

Conversation

@jderochervlk
Copy link
Collaborator

@jderochervlk jderochervlk commented Dec 2, 2025

This PR switches builds over from being configured in the Cloudfront dashboard to a Github action, which means it's now Infrastructure as Code. We can now also use a Github action to manually fire off a build, which is nice. Having this happen on a Github action will give us access to the deployment URL, which will be needed if we want to setup Playwright or Chromatic for automated testing (which would be great!).

This also tested out an example Cloudflare function, which you can see at https://d0b34a60.rescript-lang.pages.dev/echo?foo=bar. This doesn't mean that the app is using SSR, but Cloudflare pages can still have access to functions, which I plan on using to create dynamic open graph images. The function has been removed after testing. I wanted to make sure that Cloudflare could handle .jsx files.

This also changes some of the commands used for builds and development to simplify things. Now you can run yarn dev to kick off concurrent builds for ReScript, Vite, and Wrangler (which will be used to develop functions locally).

@jderochervlk jderochervlk force-pushed the vlk/cloudflare-workers branch from 7ed801e to 0273917 Compare December 2, 2025 17:09
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 2, 2025

Deploying rescript-lang-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4601f43
Status:🚫  Build failed.

View logs

@jderochervlk jderochervlk changed the title ci: use Cloudflare worker github action ci: Deploy to Cloudflare using a Github Action Dec 2, 2025
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.

2 participants