src/content/docs/en/guides/deploy/zerops.mdx
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro' import { Steps } from '@astrojs/starlight/components';
Zerops is a dev-first cloud platform that can be used to deploy both Static and SSR Astro site.
This guide will walk you through setting up and deploying both Static and SSR Astro sites on Zerops.
:::tip[Astro x Zerops Quickrun]
Want to test running Astro on Zerops without installing or setting up anything? Using repositories Zerops x Astro - Static or Zerops x Astro - SSR on Node.js you can deploy example Astro site with a single click.
:::
Running apps on Zerops requires two steps:
:::note One Zerops project can contain multiple Astro sites. :::
Projects and services can be added either through a Project add wizard or imported using a yaml structure:
# see https://docs.zerops.io/references/import for full reference
project:
name: recipe-astro
services:
- hostname: app
type: static
This will create a project called recipe-astro with a Zerops Static service called app.
To tell Zerops how to build and run your site, add a zerops.yml to your repository:
Now you can trigger the build & deploy pipeline using the Zerops CLI or by connecting the app service with your GitHub / GitLab repository from inside the service detail.
Update your start script to run the server output from the Node adapter.
"scripts": {
"start": "node ./dist/server/entry.mjs",
}
Projects and services can be added either through a Project add wizard or imported using a yaml structure:
# see https://docs.zerops.io/references/import for full reference
project:
name: recipe-astro
services:
- hostname: app
type: nodejs@20
This will create a project called recipe-astro with Zerops Node.js service called app.
To tell Zerops how to build and run your site using the official Astro Node.js adapter in standalone mode, add a zerops.yml file to your repository:
Now you can trigger the build & deploy pipeline using the Zerops CLI or by connecting the app service with your GitHub / GitLab repository from inside the service detail.
Open Settings > Access Token Management in the Zerops app and generate a new access token.
Log in using your access token with the following command:
shell zcli login <token>
Navigate to the root of your app (where zerops.yml is located) and run the following command to trigger the deploy:
shell zcli push