Dagger
Search

netlify

A utility module for deploying apps to Netlify

Installation

dagger install github.com/kpenfound/dagger-modules/netlify@v0.1.0

Entrypoint

Return Type
Netlify
Example
dagger -m github.com/kpenfound/dagger-modules/netlify@64555d157c8db0914fa7da49de419a397c7f42a1 call \
func (m *myModule) example() *Netlify  {
	return dag.
			Netlify()
}
@function
def example() -> dag.Netlify:
	return (
		dag.netlify()
	)
@func()
example(): Netlify {
	return dag
		.netlify()
}

Types

Netlify 🔗

deploy() 🔗

Deploy a site to production

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-A directory.
tokenSecret !-A reference to a secret value, which can be handled more safely than the value itself.
siteString !-No description provided
Example
dagger -m github.com/kpenfound/dagger-modules/netlify@64555d157c8db0914fa7da49de419a397c7f42a1 call \
 deploy --dir DIR_PATH --token env:MYSECRET --site string
func (m *myModule) example(ctx context.Context, dir *Directory, token *Secret, site string) string  {
	return dag.
			Netlify().
			Deploy(ctx, dir, token, site)
}
@function
async def example(dir: dagger.Directory, token: dagger.Secret, site: str) -> str:
	return await (
		dag.netlify()
		.deploy(dir, token, site)
	)
@func()
async example(dir: Directory, token: Secret, site: string): Promise<string> {
	return dag
		.netlify()
		.deploy(dir, token, site)
}

preview() 🔗

Deploy a preview site

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-A directory.
tokenSecret !-A reference to a secret value, which can be handled more safely than the value itself.
siteString !-No description provided
Example
dagger -m github.com/kpenfound/dagger-modules/netlify@64555d157c8db0914fa7da49de419a397c7f42a1 call \
 preview --dir DIR_PATH --token env:MYSECRET --site string
func (m *myModule) example(ctx context.Context, dir *Directory, token *Secret, site string) string  {
	return dag.
			Netlify().
			Preview(ctx, dir, token, site)
}
@function
async def example(dir: dagger.Directory, token: dagger.Secret, site: str) -> str:
	return await (
		dag.netlify()
		.preview(dir, token, site)
	)
@func()
async example(dir: Directory, token: Secret, site: string): Promise<string> {
	return dag
		.netlify()
		.preview(dir, token, site)
}

list() 🔗

List sites

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tokenSecret !-A reference to a secret value, which can be handled more safely than the value itself.
Example
dagger -m github.com/kpenfound/dagger-modules/netlify@64555d157c8db0914fa7da49de419a397c7f42a1 call \
 list --token env:MYSECRET
func (m *myModule) example(ctx context.Context, token *Secret) string  {
	return dag.
			Netlify().
			List(ctx, token)
}
@function
async def example(token: dagger.Secret) -> str:
	return await (
		dag.netlify()
		.list(token)
	)
@func()
async example(token: Secret): Promise<string> {
	return dag
		.netlify()
		.list(token)
}