Skip to content

GitHub Actions Deployment

Configure GitHub Repository

  1. Fork or clone the repository https://github.com/eoao/cloud-mail
  2. Go to your GitHub repository settings and add the following Secrets
Secret NameRequiredPurpose
CLOUDFLARE_API_TOKENCloudflare API Token Get API Token
CLOUDFLARE_ACCOUNT_IDCloudflare Account ID Get Account ID
D1_DATABASE_IDD1 Database ID Get Database ID
KV_NAMESPACE_IDKV Namespace ID Get Database ID
R2_BUCKET_NAMER2 Bucket Name Get Database ID
DOMAINEmail domain, multiple domains use format (e.g., ["example.com","example2.com"])
ADMINAdministrator email address (e.g., [email protected])
JWT_SECRETJWT secret key - enter any random string

Get Cloudflare API Token

  1. Visit Cloudflare Dashboard
  2. Click Create Token
  3. Select the "Edit Cloudflare Workers" template
  1. Add corresponding permissions according to the table below
  1. Save and copy the generated token to GitHub Secrets as CLOUDFLARE_API_TOKEN

Get Cloudflare Account ID

  1. Visit the Account Homepage.
  2. Copy the Account ID to GitHub Secrets as CLOUDFLARE_ACCOUNT_ID

Get Database ID

  1. Create D1 database, copy the ID to GitHub Secrets as D1_DATABASE_ID
  2. Create KV database, copy the ID to GitHub Secrets as KV_NAMESPACE_ID
  3. Create R2 object storage, set custom domain, copy bucket name to GitHub Secrets as R2_BUCKET_NAME (optional)

Run Workflow

  1. Manually run the workflow on the Actions page to start deployment
  1. Find the deployed Worker in the Cloudflare interface and set a custom domain to access the website
  1. 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