-
Fork the repository to your GitHub account.
-
Create a KV namespace (under Storage & Databases -> KV), and copy the namespace ID.
-
Update the
kv_namespacesID inwrangler.jsoncwith your own namespace ID. -
Create a project in Cloudflare Workers.
-
Select the
Sinkrepository and use the following build and deploy commands:- Build command:
pnpm run buildornpm run build - Deploy command:
npx wrangler deploy
- Build command:
-
Save and deploy the project.
-
After deployment, go to Settings -> Variables and Secrets -> Add, and configure the following environment variables:
NUXT_SITE_TOKEN: Must be at least 8 characters long. This token grants access to your dashboard.NUXT_CF_ACCOUNT_ID: Find your account ID.NUXT_CF_API_TOKEN: Create a Cloudflare API token with at leastAccount.Account Analyticspermission. See reference.
-
Enable Analytics Engine. In Workers & Pages, go to Account details in the right panel, locate Analytics Engine, and click Set up to enable the free tier.
-
Redeploy the project.
-
To update your code, refer to the official GitHub documentation: Syncing a fork branch from the web UI.