Skip to content

Commit c68c732

Browse files
docs(en): merge docs-cn/sync-docs into docs-cn/dev @ 173321c
2 parents 8b24888 + 26e91d0 commit c68c732

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

guide/static-deploy.md

-54
Original file line numberDiff line numberDiff line change
@@ -274,60 +274,6 @@ $ npx wrangler pages publish dist
274274

275275
你也可以通过添加 `surge dist yourdomain.com` 部署到一个 [自定义域名](http://surge.sh/help/adding-a-custom-domain)
276276

277-
## Heroku {#heroku}
278-
279-
1. 安装 [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli)
280-
281-
2. [注册](https://signup.heroku.com)一个 Heroku 账号。
282-
283-
3. 运行 `heroku login` 并填入你的 Heroku 凭证:
284-
285-
```bash
286-
$ heroku login
287-
```
288-
289-
4. 在项目根目录创建一个 `static.json` ,包含以下内容:
290-
291-
`static.json`:
292-
293-
```json
294-
{
295-
"root": "./dist"
296-
}
297-
```
298-
299-
这是你站点的配置,阅读 [heroku-buildpack-static](https://github.com/heroku/heroku-buildpack-static) 文档来了解更多。
300-
301-
5. 配置好你的 Heroku git 远程地址:
302-
303-
```bash
304-
# 版本变更
305-
$ git init
306-
$ git add .
307-
$ git commit -m "My site ready for deployment."
308-
309-
# 创建一个具有指定名称的新应用
310-
$ heroku apps:create example
311-
```
312-
313-
6. 设置 buildpacks。我们使用 `heroku/nodejs` 来构建项目,`heroku-buildpack-static` 为其启动服务。
314-
315-
```bash
316-
# set buildpacks
317-
$ heroku buildpacks:set heroku/nodejs
318-
$ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-static.git
319-
```
320-
321-
7. 部署站点:
322-
323-
```bash
324-
# 发布站点
325-
$ git push heroku main
326-
327-
# 在浏览器中打开 Heroku 的面板
328-
$ heroku open
329-
```
330-
331277
## Azure 的静态网站应用 {#azure-static-web-apps}
332278

333279
你可以通过微软 Azure 的 [静态网站应用](https://aka.ms/staticwebapps) 服务来快速部署你的 Vite 应用。你只需:

0 commit comments

Comments
 (0)