Gatsby
Deploy a Gatsby site to LeafCloud.
Requirements
Section titled “Requirements”Validated with Node v24.22.1, Gatsby 5.16.1, and npm. The official hello-world starter required no configuration change.
-
Clone the official Gatsby hello-world starter and install its dependencies:
Terminal window git clone --depth 1 https://github.com/gatsbyjs/gatsby-starter-hello-world.git appcd appnpm install --no-audit --no-fund -
No configuration change is needed.
-
Preview the deployment:
Terminal window leaf deploy --dry-runExpected output:
Framework: GatsbyPackage manager: npmBuild command: npm run buildOutput directory: publicFiles: 28Total size: 1132792 bytesDry run: nothing was uploaded.A real deploy uses the live line format
✓ Live at <url> (<files> files, <uploaded> uploaded)in place of the final dry-run line.
What LeafCloud detects
Section titled “What LeafCloud detects”Gatsby; npm run build; public.
Common problems
Section titled “Common problems”No Gatsby-specific refusal was captured in validation.
For agents
Section titled “For agents”Run leaf deploy --dry-run --json first.
Check the exit code and stop if the JSON contains "error".
After a successful dry run, run leaf deploy --json --yes.
Never print credentials.
Validated on 2026-10-23 with Gatsby 5.16.1.