Skip to content

Gatsby

Deploy a Gatsby site to LeafCloud.

Validated with Node v24.22.1, Gatsby 5.16.1, and npm. The official hello-world starter required no configuration change.

  1. 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 app
    cd app
    npm install --no-audit --no-fund
  2. No configuration change is needed.

  3. Preview the deployment:

    Terminal window
    leaf deploy --dry-run

    Expected output:

    Framework: Gatsby
    Package manager: npm
    Build command: npm run build
    Output directory: public
    Files: 28
    Total size: 1132792 bytes
    Dry 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.

Gatsby; npm run build; public.

No Gatsby-specific refusal was captured in validation.

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.