forked from withastro/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i18n(zh-cn): add zeabur.mdx (withastro#5960)
Co-authored-by: Xiaoyue Lin <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
- Loading branch information
1 parent
865c355
commit 4a16f4e
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: 将你的 Astro 站点部署到 Zeabur | ||
description: 如何将你的 Astro 站点部署到 Zeabur 的网络上。 | ||
type: deploy | ||
i18nReady: true | ||
--- | ||
[Zeabur](https://zeabur.com) 提供全栈网络应用的托管服务。Astro 站点可以作为 SSR 或静态输出进行托管。 | ||
|
||
本指南包含通过网页界面部署到 Zeabur 的说明。 | ||
|
||
## 项目配置 | ||
|
||
### 静态站点 | ||
|
||
Astro 默认输出静态站点。部署静态 Astro 站点到 Zeabur 无需任何额外配置。 | ||
|
||
### 服务器渲染站点 | ||
|
||
安装了 `@astrojs/node` 适配器后,Zeabur 可以部署你的服务器端渲染的 Astro 项目。 | ||
|
||
1. 如果还未安装,请[将 `@astrojs/node` 适配器添加](/zh-cn/guides/integrations-guide/node/#安装)到你的项目中。 | ||
|
||
2. 修改你的 `package.json` 文件中的启动命令: | ||
|
||
```json title="package.json" {3} | ||
{ | ||
"scripts": { | ||
"start": "node dist/server/entry.mjs" | ||
} | ||
} | ||
``` | ||
|
||
## 如何部署 | ||
|
||
如果你的项目存储在 GitHub 中,你可以将你的 Astro 站点部署到 Zeabur。 | ||
|
||
1. 在 [Zeabur dashboard](https://dash.zeabur.com) 中点击 <kbd>创建新项目</kbd>。 | ||
|
||
2. 配置 GitHub 安装并导入仓库。 | ||
|
||
3. Zeabur 将自动检测到你的项目是一个 Astro 项目,并使用 `astro build` 命令进行构建。 | ||
|
||
4. 构建完成后,你可以将域名绑定到你的站点并访问它。 | ||
|
||
在你的项目被导入和部署后,所有后续推送到分支的操作都将生成新的构建。 | ||
|
||
了解更多关于 Zeabur 的 [部署指南](https://zeabur.com/docs/get-started/)。 |