Deploy via GitHub Actions
Notice
Currently only supports Worker and Pages deployment. If you encounter any issues, please report them via GitHub Issues. Thank you.
The worker.dev domain is inaccessible in China, please use a custom domain
Deployment Steps
Fork Repository and Enable Actions
- Fork this repository on GitHub
- Open the
Actionspage of the repository - Find
Deploy Backendand clickenable workflowto enable theworkflow - If you need separate frontend and backend deployment, find
Deploy Frontendand clickenable workflowto enable theworkflow
Configure Secrets
Then go to the repository page Settings -> Secrets and variables -> Actions -> Repository secrets, and add the following secrets:
Common
secretsName Description CLOUDFLARE_ACCOUNT_IDCloudflare Account ID, Reference Documentation CLOUDFLARE_API_TOKENCloudflare API Token, Reference Documentation Worker backend
secretsName Description BACKEND_TOMLBackend configuration file, see here DEBUG_MODE(Optional) Whether to enable debug mode, set to trueto enable. By default, worker deployment logs are not output to GitHub Actions page, enabling this will output themBACKEND_USE_MAIL_WASM_PARSER(Optional) Whether to use WASM to parse emails, set to trueto enable. For features, refer to Configure Worker to use WASM Email ParserUSE_WORKER_ASSETS(Optional) Deploy Worker with frontend assets, set to trueto enablePages frontend
secretsNotice
If you choose to deploy Worker with frontend assets, these
secretsare not requiredName Description FRONTEND_ENVFrontend configuration file, please copy the content from frontend/.env.example, and modify according to this guideFRONTEND_NAMEThe project name you created in Cloudflare Pages, can be created via UI or Command Line FRONTEND_BRANCH(Optional) Branch for pages deployment, can be left unconfigured, defaults to productionPAGE_TOML(Optional) Required when using page functions to forward backend requests. Please copy the content from pages/wrangler.tomland modify theservicefield to your worker backend name according to actual situationTG_FRONTEND_NAME(Optional) The project name you created in Cloudflare Pages, same as FRONTEND_NAME. Fill this in if you need Telegram Mini App functionality
Deploy
- Open the
Actionspage of the repository - Find
Deploy Backendand clickRun workflowto select a branch and deploy manually - If you need separate frontend and backend deployment, find
Deploy Frontendand clickRun workflowto select a branch and deploy manually
How to Configure Auto-Update
- Open the
Actionspage of the repository, findUpstream Sync, and clickenable workflowto enable theworkflow - If
Upstream Syncfails, go to the repository homepage and clickSyncto synchronize manually