cloudflare
Deploy applications to Cloudflare Workers and Pages
Installation
dagger install github.com/fluent-ci-templates/cloudflare-pipeline@1531aa58a317ff183d775a221491be76382ec76e
Entrypoint
Return Type
Cloudflare
Example
dagger -m github.com/fluent-ci-templates/cloudflare-pipeline@1531aa58a317ff183d775a221491be76382ec76e call \
func (m *myModule) example() *Cloudflare {
return dag.
Cloudflare()
}
@function
def example() -> dag.Cloudflare:
return (
dag.cloudflare()
)
@func()
example(): Cloudflare {
return dag
.cloudflare()
}
Types
Cloudflare 🔗
deploy() 🔗
Deploy your Worker to Cloudflare
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
apiToken | Secret ! | - | No description provided |
accountId | String ! | - | No description provided |
Example
dagger -m github.com/fluent-ci-templates/cloudflare-pipeline@1531aa58a317ff183d775a221491be76382ec76e call \
deploy --src DIR_PATH --api-token env:MYSECRET --account-id string
func (m *myModule) example(ctx context.Context, src *Directory, apiToken *Secret, accountId string) string {
return dag.
Cloudflare().
Deploy(ctx, src, apiToken, accountId)
}
@function
async def example(src: dagger.Directory, api_token: dagger.Secret, account_id: str) -> str:
return await (
dag.cloudflare()
.deploy(src, api_token, account_id)
)
@func()
async example(src: Directory, apiToken: Secret, accountId: string): Promise<string> {
return dag
.cloudflare()
.deploy(src, apiToken, accountId)
}
pagesDeploy() 🔗
Deploy a directory of static assets as a Pages deployment.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
apiToken | Secret ! | - | No description provided |
accountId | String ! | - | No description provided |
directory | String ! | - | No description provided |
projectName | String ! | - | No description provided |
Example
dagger -m github.com/fluent-ci-templates/cloudflare-pipeline@1531aa58a317ff183d775a221491be76382ec76e call \
pages-deploy --src DIR_PATH --api-token env:MYSECRET --account-id string --directory string --project-name string
func (m *myModule) example(ctx context.Context, src *Directory, apiToken *Secret, accountId string, directory string, projectName string) string {
return dag.
Cloudflare().
PagesDeploy(ctx, src, apiToken, accountId, directory, projectName)
}
@function
async def example(src: dagger.Directory, api_token: dagger.Secret, account_id: str, directory: str, project_name: str) -> str:
return await (
dag.cloudflare()
.pages_deploy(src, api_token, account_id, directory, project_name)
)
@func()
async example(src: Directory, apiToken: Secret, accountId: string, directory: string, projectName: string): Promise<string> {
return dag
.cloudflare()
.pagesDeploy(src, apiToken, accountId, directory, projectName)
}