Deploy your Astro Site to Zerops
Это содержимое пока не доступно на вашем языке.
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 seting up and deploying both Static and SSR Astro sites on Zerops.
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:
- Creating a project
- Triggering build & deploy pipeline
One Zerops project can contain multiple Astro sites.
Astro Static site on Zerops
Section titled Astro Static site on ZeropsCreating a project and a service for Astro Static
Section titled Creating a project and a service for Astro StaticProjects and services can be added either through a Project add
wizard or imported using a yaml structure:
This 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 siteThe app
service is now ready for our code. Since Astro static doesn’t require any changes to the code, the only thing we need to do is add zerops.yml
to our repository, which tells Zerops how to build and run your site.
Now you can trigger the build & deploy pipeline using 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 ZeropsCreating 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:
This 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 siteThe app
service is now ready for our code. Zerops uses the official Astro Node.js adapter in standalone
mode, so update your astro.config.mjs
accordingly.
The only thing left after is to add zerops.yml
to our repository, which tells Zerops how to build and run your site.
Now you can trigger the build & deploy pipeline using CLI or by connecting the app
service with your GitHub / GitLab repository from inside the service detail.
Trigger the pipeline Using Zerops CLI (zcli)
Section titled Trigger the pipeline Using Zerops CLI (zcli)-
Install the Zerops CLI.
-
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:
-
Navigate to the root of your app (where
zerops.yml
is located) and run the following command to trigger the deploy:
Resources
Section titled Resources- Create Zerops account
- Zerops Documentation
- Zerops Astro recipe
- Community blog: Deploying Astro to Zerops in 3 mins