All templates

Deploy an Astro site on Rebasable

Static Astro site served from the Rebasable edge, free, with long cache headers on hashed assets.

Runtime: static Static site, free staticastro

How it works

Static sites build once (npm ci && npm run build) and Rebasable serves dist/ from its edge with compression. Files under /_astro/ have content hashes in their names, so the template sends Cache-Control: immutable for them. Static sites are free; only bandwidth over the plan allowance is billed.

Run it locally

npm install
npm run dev   # http://localhost:4321

Use it as your own repository

Copy the astro folder of the templates repository into a new repo (the files at the root, rebasable.yaml included) and push it. Then add a Deploy button to its README, or create it from Blueprints, New blueprint in the dashboard. From then on, every push deploys, and pull requests get preview environments.

Good to know

  • Need server rendering? Add the @astrojs/node adapter in standalone mode, switch the service to type: web with runtime: node and startCommand: node dist/server/entry.mjs.
  • Redirects and headers go in rebasable.yaml under routes and headers, so they work the same in previews.