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.
Running apps on Zerops requires two steps:
- Creating a project
- Triggering build & deploy pipeline
Astro Static site on Zerops
Section titled “Astro Static site on Zerops”Creating a project and a service for Astro Static
Section titled “Creating a project and a service for Astro Static”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 referenceproject: name: recipe-astroservices: - hostname: app type: staticThis will create a project called recipe-astro with a Zerops Static service called app.
Deploying your Astro Static site
Section titled “Deploying your Astro Static site”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.
Astro SSR site on Zerops
Section titled “Astro SSR site on Zerops”Update scripts
Section titled “Update scripts”Update your start script to run the server output from the Node adapter.
"scripts": { "start": "node ./dist/server/entry.mjs",}Creating a project and a service for Astro SSR (Node.js)
Section titled “Creating a project and a service for Astro SSR (Node.js)”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 referenceproject: name: recipe-astroservices: - hostname: app type: nodejs@20This will create a project called recipe-astro with Zerops Node.js service called app.
Deploying your Astro SSR site
Section titled “Deploying your Astro SSR site”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.