Skip to content

Cloudflare Workers ​

Prerequisites ​

Fork the Repository ​

  1. Open the Pixtale repository on GitHub.

  2. Select Fork in the upper-right corner and create a fork under your account.

    Fork button on the Pixtale GitHub repository

Create a D1 Database and a KV Namespace ​

  1. Open the Cloudflare dashboard.

  2. Create a D1 database and a Workers KV namespace.

  3. Copy the D1 database ID and the KV namespace ID.

    D1 database and KV namespace in the Cloudflare dashboard

Create a Cloudflare API Token ​

  1. In the Cloudflare dashboard, go to Settings → Account API Tokens.

  2. Select the Edit Cloudflare Workers template and create a token.

  3. Copy the API token and your Cloudflare account ID.

    Cloudflare API token settings

Add GitHub Actions Secrets ​

  1. In your fork, go to Settings → Secrets and variables → Actions.
  2. Under Repository secrets, select New repository secret and add each secret below.
SecretRequiredDescription
ADMINYesAdministrator username
PASSWORDYesAdministrator password
D1_DATABASE_IDYesID of the D1 database you created
KV_NAMESPACE_IDYesID of the KV namespace you created
JWT_SECRETYesJWT signing secret. Use a strong, randomly generated value.
CLOUDFLARE_API_TOKENYesCloudflare API token you created
CLOUDFLARE_ACCOUNT_IDYesYour Cloudflare account ID
WORKER_NAMENoWorker name. Defaults to pixtale.
Repository secrets in GitHub Actions settings

Deploy Pixtale ​

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

    Run workflow button on the GitHub Actions tab
  2. After the workflow succeeds, open Workers & Pages in the Cloudflare dashboard, select your Worker, and add a custom domain.

  3. Open the custom domain in your browser and sign in with the administrator username and password you configured.

    Pixtale sign-in screen