Skip to main content

@adrper79-dot/deploy

CLI helpers and shell scripts for deploying Factory apps to Cloudflare Workers. No runtime dependencies.

Installation

npm install @adrper79-dot/deploy

Scripts

deploy-all

Deploys all packages in dependency order using wrangler deploy.
npx deploy-all --env production

validate-bindings

Checks that all required Wrangler bindings are present in wrangler.jsonc before deploy.
function validateBindings(
  config: WranglerConfig,
  required: string[],
): { valid: boolean; missing: string[] };

tagRelease

Creates and pushes a version tag in <package>/v<version> format.
function tagRelease(pkg: string, version: string): Promise<void>;

CI integration

Add to .github/workflows/deploy.yml:
- name: Deploy to Cloudflare Workers
  run: npx deploy-all --env production
  env:
    CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
    CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}