Repository navigation
Conversation
Contributor
Confidence Score: 5/5
[Medium impact] No blocking issue remains; the declared Node minimum still needs a small correction. SummaryAdds Cloudflare static-site deployment through GitHub Actions.
Reviews (2) · Last reviewed commit: "address review" · Reviewed by Greptile |
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.
This PR adds a wrangler.jsonc file to deploy to Cloudflare. Cloudflare encourages all worker configuration to keep them in sync, so it's consistent. Large diff is, unsurprisingly, mostly package-lock.json.
The config is quite simple, this is a static site, so we don't need any server entrypoint file. As a result, it's completely free.
This also enables building on actions, instead of Cloudflare building it. Cloudflare's builder has no fetch depth, and forcing it to do a full pull is annoying. We get full control over how it builds with GitHub Actions, hence why I very explicitly specify full depth (ironically says 0, but it means full!) in the checkout stage.
Evidently this also bumps minimum node to specifically 22.12. 20 was EOL anyway, so this shouldn't affect anything.
Testing this PR, setting up for merge:
ghor however you want.npm ito install wrangler.npm run buildnpx wrangler dev, this is what the workers will look like, and is different fromnpm run dev(powered by Vitepress)npm run deploy, this will create a Worker on Cloudflare, you may need to select the RetroAchievements organization.If we decide to deploy with GitHub, continue on. Also under this section is a way to connect to Git instead.
If all this is good, once merged, it should just build and deploy automatically.
I followed these steps, and this is what my site looks like: https://ra-docs.chew.workers.dev. Notice how the Git history shows under all the pages.