Skip to content

Commit

Permalink
docs: tweak deploy guide
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 23, 2018
1 parent fa404dc commit e680936
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions docs/guide/deploy.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# 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

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 `"/"`.

Expand All @@ -23,7 +35,7 @@ You can also run this script in your CI setup to enable automatic deployment on
set -e
# build
vuepress build docs
npm run docs:build
# navigate into the build output directory
cd docs/.vuepress/dist
Expand All @@ -46,19 +58,9 @@ cd -

## Netlify

1. Make sure you have npm scripts for building your docs:

``` json
{
"scripts": {
"docs:build": "vuepress build docs"
}
}
```

2. On Netlify, setup up a new project from GitHub with the following settings:
1. On Netlify, setup up a new project from GitHub with the following settings:

- **Build Command:** `npm run docs:build` or `yarn docs:build`
- **Publish directory:** `docs/.vuepress/dist`

3. Hit the deploy button!
2. Hit the deploy button!

0 comments on commit e680936

Please sign in to comment.