Dagger
Search

astro-site

Canonical CI pipeline for Astro static sites in the chirag127 fleet.
Runs lint + typecheck + test in parallel, then build. Missing scripts
are no-ops via `pnpm run --if-present`.

MegaLinter is opt-in (not part of default ci()).

Per chirag127/workspace/knowledge/decisions/stack/dagger-confirmed-2026-07-02.md

Installation

dagger install github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b

Entrypoint

Return Type
AstroSite
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
func (m *MyModule) Example() *dagger.AstroSite  {
	return dag.
			Astrosite()
}
@function
def example() -> dagger.AstroSite:
	return (
		dag.astro_site()
	)
@func()
example(): AstroSite {
	return dag
		.astroSite()
}

Types

AstroSite 🔗

lint() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
 lint --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string  {
	return dag.
			Astrosite().
			Lint(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.astro_site()
		.lint(source)
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.astroSite()
		.lint(source)
}

typecheck() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
 typecheck --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string  {
	return dag.
			Astrosite().
			Typecheck(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.astro_site()
		.typecheck(source)
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.astroSite()
		.typecheck(source)
}

test() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
 test --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string  {
	return dag.
			Astrosite().
			Test(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.astro_site()
		.test(source)
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.astroSite()
		.test(source)
}

megalint() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
 megalint --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string  {
	return dag.
			Astrosite().
			Megalint(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.astro_site()
		.megalint(source)
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.astroSite()
		.megalint(source)
}

build() 🔗

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
 build --source DIR_PATH
func (m *MyModule) Example(source *dagger.Directory) *dagger.Directory  {
	return dag.
			Astrosite().
			Build(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
	return (
		dag.astro_site()
		.build(source)
	)
@func()
example(source: Directory): Directory {
	return dag
		.astroSite()
		.build(source)
}

ci() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
 ci --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string  {
	return dag.
			Astrosite().
			Ci(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.astro_site()
		.ci(source)
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.astroSite()
		.ci(source)
}

deployCloudflare() 🔗

Deploy to Cloudflare Pages via wrangler. Umbrella-only.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
cfApiTokenSecret !-No description provided
cfAccountIdSecret !-No description provided
projectNameString !-No description provided
branchString !-No description provided
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
 deploy-cloudflare --source DIR_PATH --cf-api-token env:MYSECRET --cf-account-id env:MYSECRET --project-name string --branch string
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, cfApiToken *dagger.Secret, cfAccountId *dagger.Secret, projectName string, branch string) string  {
	return dag.
			Astrosite().
			Deploycloudflare(ctx, source, cfApiToken, cfAccountId, projectName, branch)
}
@function
async def example(source: dagger.Directory, cfapitoken: dagger.Secret, cfaccountid: dagger.Secret, projectname: str, branch: str) -> str:
	return await (
		dag.astro_site()
		.deploycloudflare(source, cfapitoken, cfaccountid, projectname, branch)
	)
@func()
async example(source: Directory, cfApiToken: Secret, cfAccountId: Secret, projectName: string, branch: string): Promise<string> {
	return dag
		.astroSite()
		.deployCloudflare(source, cfApiToken, cfAccountId, projectName, branch)
}