使用 Cleavr 部署你的 Astro 站点
你可以使用服务器和应用部署管理工具 Cleavr 将 Astro 项目部署到你自己的虚拟专用服务器 (VPS)。
¥You can deploy your Astro project to your own Virtual Private Server (VPS) using Cleavr, a server and app deployment management tool.
先决条件
标题部分 先决条件¥Prerequisites
首先,你将需要:
¥To get started, you will need:
-
一个 Cleavr 账户
-
使用 Cleavr 的 VPS 提供商上的服务器
添加你的网站
标题部分 添加你的网站¥Add your site
-
In Cleavr, navigate to the server you want to add your Astro project to.
-
Select Add Site and fill in the details for your application, such as domain name.
-
For App Type, select ‘NodeJS Static’ or ‘NodeJS SSR’ according to how you are setting up your Astro app.
-
For Static apps, set Artifact Folder to
dist
. -
For SSR apps:
- Set Entry Point to
entry.mjs
. - Set Artifact Folder to
dist/server
.
- Set Entry Point to
-
Select Add to add the site to your server.
设置和部署
标题部分 设置和部署¥Setup and deploy
-
Once your new site is added, click Setup and deploy.
-
Select the VC Profile, Repo, and Branch for your Astro Project.
-
Make any additional configurations necessary for your project.
-
Click on the Deployments tab and then click on Deploy.
恭喜,你刚刚部署了 Astro 应用!
¥Congratulations, you’ve just deployed your Astro app!