Cloudflare Workers
Prerequisites
Fork the Repository
Open the Pixtale repository on GitHub.
Select Fork in the upper-right corner and create a fork under your account.

Create a D1 Database and a KV Namespace
Open the Cloudflare dashboard.
Create a D1 database and a Workers KV namespace.
Copy the D1 database ID and the KV namespace ID.

Create a Cloudflare API Token
In the Cloudflare dashboard, go to Settings → Account API Tokens.
Select the Edit Cloudflare Workers template and create a token.
Copy the API token and your Cloudflare account ID.

Add GitHub Actions Secrets
- In your fork, go to Settings → Secrets and variables → Actions.
- Under Repository secrets, select New repository secret and add each secret below.
| Secret | Required | Description |
|---|---|---|
ADMIN | Yes | Administrator username |
PASSWORD | Yes | Administrator password |
D1_DATABASE_ID | Yes | ID of the D1 database you created |
KV_NAMESPACE_ID | Yes | ID of the KV namespace you created |
JWT_SECRET | Yes | JWT signing secret. Use a strong, randomly generated value. |
CLOUDFLARE_API_TOKEN | Yes | Cloudflare API token you created |
CLOUDFLARE_ACCOUNT_ID | Yes | Your Cloudflare account ID |
WORKER_NAME | No | Worker name. Defaults to pixtale. |

Deploy Pixtale
In your fork, open the Actions tab, select the Cloudflare deployment workflow, and choose Run workflow.

After the workflow succeeds, open Workers & Pages in the Cloudflare dashboard, select your Worker, and add a custom domain.
Open the custom domain in your browser and sign in with the administrator username and password you configured.

