Skip to main content

Cloudflare

Run the following command to run the pre-built Cloudflare Pipeline in your project to deploy your Cloudflare Workers to Cloudflare:

fluentci run cloudflare deploy

Environment variables

VariableDescription
CLOUDFLARE_API_TOKENCloudflare API token.
CLOUDFLARE_ACCOUNT_IDCloudflare account ID.

Jobs

JobDescription
deployDeploys your Worker to Cloudflare.

Programmatic usage

You can also use this pipeline programmatically:

import { deploy } from from "jsr:@fluentci/cloudflare";

await deploy();

CI/CD integrations

The following example shows how to integrate FluentCI with popular CI providers to deploy your Cloudflare Workers to Cloudflare:

ci.yml
name: 
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Deploy
uses: fluentci-io/setup-fluentci@v5
with:
wasm: true
plugin: cloudflare
args: |
deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}