提交 e680936a 编写于 作者: E Evan You

docs: tweak deploy guide

上级 fa404dc6
# Deploying # Deploying
The following guides assumes you are placing your docs inside the `docs` directory of your project and using the default build output location. The following guides are based on a few shared assumptions:
- You are placing your docs inside the `docs` directory of your project;
- You are using the default build output location (`.vuepress/dist`);
- VuePress is installed as a local dependency in your project, and you have setup the following npm scripts:
``` json
{
"scripts": {
"docs:build": "vuepress build docs"
}
}
```
## GitHub Pages ## GitHub Pages
1. Set correct `base` in `.vuepress/config.js`. 1. Set correct `base` in `.vuepress/config.js`.
If you are deploying to `https://<USERNAME>.github.io/`, you can omit `base` as it defaults to `"/"`. If you are deploying to `https://<USERNAME>.github.io/`, you can omit `base` as it defaults to `"/"`.
...@@ -23,7 +35,7 @@ You can also run this script in your CI setup to enable automatic deployment on ...@@ -23,7 +35,7 @@ You can also run this script in your CI setup to enable automatic deployment on
set -e set -e
# build # build
vuepress build docs npm run docs:build
# navigate into the build output directory # navigate into the build output directory
cd docs/.vuepress/dist cd docs/.vuepress/dist
...@@ -46,19 +58,9 @@ cd - ...@@ -46,19 +58,9 @@ cd -
## Netlify ## Netlify
1. Make sure you have npm scripts for building your docs: 1. On Netlify, setup up a new project from GitHub with the following settings:
``` json
{
"scripts": {
"docs:build": "vuepress build docs"
}
}
```
2. On Netlify, setup up a new project from GitHub with the following settings:
- **Build Command:** `npm run docs:build` or `yarn docs:build` - **Build Command:** `npm run docs:build` or `yarn docs:build`
- **Publish directory:** `docs/.vuepress/dist` - **Publish directory:** `docs/.vuepress/dist`
3. Hit the deploy button! 2. Hit the deploy button!
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册