GitHub Actions Deployment
Configure GitHub Repository
- Fork or clone the repository https://github.com/eoao/cloud-mail
- Go to your GitHub repository settings and add the following Secrets
Secret Name | Required | Purpose |
---|---|---|
CLOUDFLARE_API_TOKEN | ✅ | Cloudflare API Token Get API Token |
CLOUDFLARE_ACCOUNT_ID | ✅ | Cloudflare Account ID Get Account ID |
D1_DATABASE_ID | ✅ | D1 Database ID Get Database ID |
KV_NAMESPACE_ID | ✅ | KV Namespace ID Get Database ID |
R2_BUCKET_NAME | ❌ | R2 Bucket Name Get Database ID |
DOMAIN | ✅ | Email domain, multiple domains use format (e.g., ["example.com","example2.com"] ) |
ADMIN | ✅ | Administrator email address (e.g., [email protected] ) |
JWT_SECRET | ✅ | JWT secret key - enter any random string |

Get Cloudflare API Token
- Visit Cloudflare Dashboard
- Click
Create Token
- Select the "Edit Cloudflare Workers" template

- Add corresponding permissions according to the table below

- Save and copy the generated token to GitHub Secrets as
CLOUDFLARE_API_TOKEN
Get Cloudflare Account ID
- Visit the Account Homepage.
- Copy the Account ID to GitHub Secrets as
CLOUDFLARE_ACCOUNT_ID

Get Database ID
- Create D1 database, copy the ID to GitHub Secrets as
D1_DATABASE_ID
- Create KV database, copy the ID to GitHub Secrets as
KV_NAMESPACE_ID
- Create R2 object storage, set custom domain, copy bucket name to GitHub Secrets as
R2_BUCKET_NAME
(optional)

Run Workflow
- Manually run the workflow on the Actions page to start deployment

- Find the deployed Worker in the Cloudflare interface and set a custom domain to access the website

- Subsequent repository syncs will automatically deploy to Workers. Automatic repository sync can use a Bot or manually click the Sync Upstream button
System Function Settings
Register an administrator account and log in, then enter system settings
- Email Receiving
👉 UI Deployment Refer to step 5 - Email Sending
👉 UI Deployment Refer to step 7 - CAPTCHA Verification
👉 UI Deployment Refer to step 8 - Email Push Notifications
👉 UI Deployment Refer to step 9
