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@2bd56fd853ba69f656415285cb4d10d80e4bb15bEntrypoint
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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
lint --source DIR_PATHfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
typecheck --source DIR_PATHfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
test --source DIR_PATHfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
megalint --source DIR_PATHfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
build --source DIR_PATHfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/chirag127/workflows/dagger/astro-site@2bd56fd853ba69f656415285cb4d10d80e4bb15b call \
ci --source DIR_PATHfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
| cfApiToken | Secret ! | - | No description provided |
| cfAccountId | Secret ! | - | No description provided |
| projectName | String ! | - | No description provided |
| branch | String ! | - | 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 stringfunc (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)
}