Before the deployment workflow can run successfully, you need to configure the following secrets in your GitHub repository:
Create a Cloudflare API token with the following settings:
- Account: Workers Scripts : Edit
- Zone: Zone : Read
- Zone: Workers Routes : Edit
- Include: The account
- Include : Specific zone : den.ai
To create the token:
- Go to https://dash.cloudflare.com/profile/api-tokens
- Click "Create Token"
- Use the "Custom token" template
- Add the permissions mentioned above
- Copy the generated token
Find your Cloudflare Account ID:
- Go to the Cloudflare dashboard
- Select your account
- The Account ID is shown in the right sidebar
- Go to your repository on GitHub
- Navigate to Settings → Secrets and variables → Actions
- Click "New repository secret"
- Add each secret:
-
Name:
CLOUDFLARE_API_TOKEN
-
Value: Your Cloudflare API token
-
Name:
CLOUDFLARE_ACCOUNT_ID
-
Value: Your Cloudflare Account ID
-
- On push to main: Automatically deploys to Cloudflare Workers
- On pull request: Runs typecheck and performs a dry-run deployment
- The deployment uses the configuration from
apps/router/wrangler.jsonc
- The worker will be deployed with the route
docs.den.ai/*