Repository navigation
ci(website): deploy the site to Cloudflare Workers instead of GitHub Pages #1198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Read by Cloudflare at the root of the deployed build (website/wrangler.jsonc). | ||
| # Docusaurus puts a content hash in the name of every file under assets/, so a | ||
| # cached copy can never go stale. | ||
| /assets/* | ||
| Cache-Control: public, max-age=31536000, immutable | ||
| /:locale/assets/* | ||
| Cache-Control: public, max-age=31536000, immutable |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Cloudflare Workers config for getopenscreen.com, deployed by .github/workflows/docs.yml. | ||
| // Assets only, no Worker script: Cloudflare serves static assets without counting | ||
| // them against the Workers request quota. | ||
| { | ||
| "name": "getopenscreen-website", | ||
| // An identifier, not a credential: the API token in CI is the secret. | ||
| "account_id": "49f0ef8f15d646deb80a7e7d675a4910", | ||
| "compatibility_date": "2026-10-01", | ||
| "assets": { | ||
| "directory": "./build", | ||
| // The nearest 404.html, so /fr/missing/ gets the French page, not the English one. | ||
| "not_found_handling": "404-page" | ||
| }, | ||
| // A route on the proxied apex, not a custom domain: Cloudflare will not attach a | ||
| // custom domain over existing DNS records (error 100117). With a route, the move off | ||
| // GitHub Pages was only switching those records to proxied, with no gap. | ||
| "routes": [{ "pattern": "getopenscreen.com/*", "zone_name": "getopenscreen.com" }], | ||
| // The site has one address; a workers.dev copy would be a duplicate of it. | ||
| "workers_dev": false, | ||
| "preview_urls": false | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // www.getopenscreen.com only: every request goes to the same path on the apex, as | ||
| // GitHub Pages did. Deployed by hand (`npx wrangler deploy` in this folder); it has no | ||
| // reason to change with the site. | ||
| export default { | ||
| fetch(request) { | ||
| const url = new URL(request.url); | ||
| url.protocol = "https:"; | ||
| url.hostname = "getopenscreen.com"; | ||
| return Response.redirect(url.toString(), 301); | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| }, | ||
| }; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Redirects www to the apex (index.js). The site itself is ../wrangler.jsonc. | ||
| { | ||
| "name": "getopenscreen-www-redirect", | ||
| "account_id": "49f0ef8f15d646deb80a7e7d675a4910", | ||
| "main": "index.js", | ||
| "compatibility_date": "2026-10-01", | ||
| "workers_dev": false, | ||
| "preview_urls": false, | ||
| // A route, like the site's: the www record only has to be proxied. | ||
| "routes": [{ "pattern": "www.getopenscreen.com/*", "zone_name": "getopenscreen.com" }] | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.