v0.7.5
A ready-to-use CI/CD Pipeline for deploying your Cloudflare Workers .
Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Dependencies
deno.land/x
other
skypack.dev
lodash
Cloudflare Pipeline
A ready-to-use CI/CD Pipeline for deploying your applications to Cloudflare Workers / Cloudflare Pages.
🚀 Usage
Run the following command:
fluentci run cloudflare_pipelineDagger Module
Use as a Dagger Module:
dagger install github.com/fluent-ci-templates/cloudflare-pipeline@mainCall functions from the module:
# Deploy to Cloudflare Workers
dagger call deploy --src . \
--api-token CF_API_TOKEN \
--account-id $CF_ACCOUNT_ID \
--project-name $PROJECT_NAME
# Deploy to Cloudflare Pages
dagger call pages-deploy --src . \
--api-token CF_API_TOKEN \
--account-id $CF_ACCOUNT_ID \
--directory dist \
--project-name $PROJECT_NAMEEnvironment Variables
| Variable | Description |
|---|---|
| CF_API_TOKEN | Your Cloudflare API Token. |
| CF_ACCOUNT_ID | Your Cloudflare Account ID. |
| DIRECTORY | The directory to deploy to Cloudflare Pages. Defaults to . |
| PROJECT_NAME | The name of your project. |
Jobs
| Job | Description |
|---|---|
| deploy | Deploys your Worker to Cloudflare. |
| pagesDeploy | Deploy a directory of static assets as a Pages deployment. |
pagesDeploy(
src: string | Directory,
apiToken: string | Secret,
accountId: string,
directory: string,
projectName: string,
): Promise<string>
deploy(
src: string | Directory,
apiToken: string | Secret,
accountId: string
): Promise<string>Programmatic usage
You can also use this pipeline programmatically:
import { deploy } from "https://pkg.fluentci.io/cloudflare_pipeline@v0.7.5/mod.ts";
await deploy(
".",
Deno.env.get("CF_API_TOKEN")!,
Deno.env.get("CF_ACCOUNT_ID")!
);