提交 0b5adf11 编写于 作者: A Antoine CARON 提交者: ULIVZ

docs: add documentation about travis (#1213)

上级 1e6900ac
......@@ -56,6 +56,32 @@ cd -
You can also run the above script in your CI setup to enable automatic deployment on each push.
:::
### Github Pages and Travis CI
1. Set correct `base` in `docs/.vuepress/config.js`.
If you are deploying to `https://<USERNAME or GROUP>.github.io/`, you can omit `base` as it defaults to `"/"`.
If you are deploying to `https://<USERNAME or GROUP>.github.io/<REPO>/`, (i.e. your repository is at `https://github.com/<USERNAME>/<REPO>`), set `base` to `"/<REPO>/"`.
2. Create a file named `.travis.yml` in the root of your project.
3. Use Github Pages deploy provider template and follow the [travis documentation](https://docs.travis-ci.com/user/deployment/pages/).
``` yaml
language: node_js
script:
- npm run docs:build
deploy:
provider: pages
skip-cleanup: true
local_dir: docs/.vuepress/dist
github-token: $GITHUB_TOKEN # a token generated on github allowing travis to push code on you repository
keep-history: true
on:
branch: master
```
## GitLab Pages and GitLab CI
1. Set correct `base` in `docs/.vuepress/config.js`.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册