docs: add how to deploy

This commit is contained in:
YunYouJun 2022-11-25 03:49:36 +08:00
parent 181dae1ddc
commit 7c71371f7a
5 changed files with 43 additions and 16 deletions

View File

@ -0,0 +1,37 @@
---
title: Deploy
title_zh: 部署
categories:
- Guide
end: false
---
Valaxy 的部署非常简单,我们推荐你直接通过第三方的 CI 构建并托管到任意平台。
### 自行部署
```bash
# 构建打包
npm run build
# dist 文件夹为构建后的内容
```
### 第三方部署
#### GitHub Pages
在使用 `pnpm create valaxy` 创建模版项目时,已内置文件[`.github/workflows/gh-pages.yml`](https://github.com/YunYouJun/valaxy/blob/main/packages/create-valaxy/template/.github/workflows/gh-pages.yml) 以实现 GitHub Actions 的自动部署工作流。
上传至 GitHub Repo打开 `Settings` -> `Pages`,选择 `gh-pages` 分支。
> `gh-pages` 已由 `.github/workflows/gh-pages.yml` 自动部署。
#### Netlify
已内置 `netlify.toml`.
#### 其他
TODO
你还可以使用 [Vercel](https://vercel.com/)/[Render](https://render.com/)/[Cloudflare Pages](https://pages.cloudflare.com/) 等进行托管。

View File

@ -117,6 +117,11 @@ npm run build:spa
# valaxy build
```
## SEO
Valaxy 已经默认集成了 Open Graph 的 SEO 优化,您无需为此操心。
但需要注意的是,对于大部分搜索引擎来说,他们可能只青睐 SSG 的构建模式。
## RSS
独立地 RSS 构建

View File

@ -156,21 +156,7 @@ Documentation is being improved!
## 部署 {lang="zh-CN"}
### GitHub Pages 自动部署
上传至 GitHub Repo打开 `Settings` -> `Pages`,选择 `gh-pages` 分支。
> `gh-pages` 已由 `.github/workflows/gh-pages.yml` 自动部署。
### 自行部署
```bash
# 构建打包
npm run build
# dist 文件夹为构建后的内容
```
可使用 [Netlify](https://www.netlify.com/)/[Vercel](https://vercel.com/)/[Render](https://render.com/)/[Cloudflare Pages](https://pages.cloudflare.com/) 等进行托管。
部署可参见 <RouterLink to="/guide/deploy">部署|指南</RouterLink>
## Upgrade {lang="en"}

View File

@ -11,7 +11,6 @@ export * from './dark'
export * from './layout'
export * from './widgets'
export * from './locale'
export * from './seo'
export * from './sidebar'
export * from './outline'