Sample.app
Framework Guides

Astro

Deploy an Astro project to Sample.app.

Astro outputs static files to dist/ by default, which the CLI auto-detects.

Deploy

Build your project

npm run build

Deploy to Sample.app

samplex deploy

Or specify the directory explicitly:

samplex deploy ./dist

Hybrid rendering

If you're using Astro's hybrid or server mode, only pre-rendered pages will work with Sample.app.

Pages that use server-side rendering won't be included in the static output. Make sure pages you want to deploy have prerender: true set.

To switch to fully static output:

astro.config.mjs
import { defineConfig } from "astro/config";

export default defineConfig({
  output: "static",
});

On this page