cloudflare-pages-deploy
v0.0.1
Published
Cloudflare Pages deploy logic extracted from the official Cloudflare CLI, wrangler.
Maintainers
Readme
Cloudflare Pages Deploy
Want to deploy a project straight to Cloudflare Pages in JavaScript or TypeScript?
Cloudflare provides the [wrangler](https://www.npmjs.com/package/wrangler) CLI for convenient deployments from the terminal. However, Cloudflare has no official SDK for programmatic JavaScript/TypeScript deployments.
This package extracts the deployment logic from the wrangler CLI (which is written in TypeScript) and exports it as a fully-typed JavaScript module.
import { deployPages } from "cloudflare-pages-deploy"
await deployPages({
directory: "./example-source-directory",
projectName: "exampleprojectname",
accountId: "exampleaccountid",
branch: "production",
productionBranch: "production"
})This function executes the wrangler logic to log in and deploy a static website.
