v0.9.4
A ready-to-use CI/CD Pipeline for deploying your Cloudflare Workers .
Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Dependencies
other
jsr:@std/flags@0.218.2jsr:@std/fmt@0.218.2/colorsjsr:@std/path@0.218.2jsr:@std/testing@0.218.2/assertsjsr:@tsirysndr/env-js@0.1.2jsr:@tsirysndr/exit-js@0.1.0jsr:@tsirysndr/fluent-az-pipelines@0.3jsr:@tsirysndr/fluent-circleci@0.3jsr:@tsirysndr/fluent-codepipeline@0.3jsr:@tsirysndr/fluent-gh-actions@0.3jsr:@tsirysndr/fluent-gitlab-ci@0.5npm:graphql-request@6.1.0npm:graphql@16.8.1npm:lodash@4.17.21npm:node-color-log@11.0.2npm:stringify-tree@1.1.1
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_pipeline🧩 Dagger 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_NAME🛠️ Environment Variables
| Variable | Description |
|---|---|
| CLOUDFLARE_API_TOKEN | Your Cloudflare API Token. |
| CLOUDFLARE_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 "jsr:@fluentci/cloudflare";
await deploy(
".",
Deno.env.get("CLOUDFLARE_API_TOKEN")!,
Deno.env.get("CLOUDFLARE_ACCOUNT_ID")!
);