Repository navigation
Deploy the website to Cloudflare Workers from GitHub Actions - #775
Merged
Merged
Conversation
Pages is being retired across Pulsate in favour of Workers, so every site is deployed the same way from its own wrangler.jsonc. The site is fully static, so it needs nothing beyond static assets with the 404 page. Co-Authored-By: Claude <[email protected]>
The Cloudflare GitHub App that drove Pages deployments has been removed, so the site no longer deploys on push. Deploying from Actions only after Build ci succeeds also keeps commits that fail lint or build out of production. Co-Authored-By: Claude <[email protected]>
Contributor
Author
|
インフラ移行のため,特例でマージします. |
3 tasks
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.
概要
pulsate.devの配信を Cloudflare Pages から Cloudflare Workers (静的アセット) に移し,デプロイを GitHub Actions から行うようにします.Pages の自動デプロイは Cloudflare の GitHub App を外したため現在止まっています.変更内容
wrangler.jsoncを追加assets:./dist/,not_found_handling: "404-page"routes:pulsate.dev/*(custom domain ではなく route).pulsate-dev/infra が管理する proxied CNAME の上に乗るため,DNS を変えずに切り替え・切り戻しができますworkers_dev: false/preview_urls: false.github/workflows/deploy.yamlを追加mainへの push でBuild ciが成功したときだけ,そのコミットをビルドしてデプロイ (workflow_run).手動実行にも対応npx --yes [email protected]で実行 (依存を増やさないため.cloudflare/wrangler-actionはpnpm addを使い,pnpm ワークスペースのルートで失敗するおそれがあるため不採用)確認したこと
pnpm run build→wrangler deploy --dry-runが通ることpnpm biome ciに新たな指摘がないこと (既存のbiome.jsoncの警告のみ)マージ前に必要なこと
CLOUDFLARE_API_TOKENとCLOUDFLARE_ACCOUNT_IDを登録マージ後
pulsate.devは Worker から配信されます.問題があればダッシュボードで route を削除すると Pages に戻りますGenerated by Claude Code