Update CI section in guide for travis dpl-v2
This is so that the instructions work when deploying the book to GitHub pages via the gh-pages branch.
This commit is contained in:
parent
eaa6914205
commit
cbfd75a821
|
@ -12,7 +12,8 @@ run.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
language: rust
|
language: rust
|
||||||
sudo: false
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- cargo
|
- cargo
|
||||||
|
@ -39,18 +40,24 @@ permissions (or "repo" for private repositories). Go to your repository's Travis
|
||||||
CI settings page and add an environment variable named `GITHUB_TOKEN` that is
|
CI settings page and add an environment variable named `GITHUB_TOKEN` that is
|
||||||
marked secure and *not* shown in the logs.
|
marked secure and *not* shown in the logs.
|
||||||
|
|
||||||
|
Whilst still in your repository's settings page, navigate to Options and change the
|
||||||
|
Source on GitHub pages to `gh-pages`.
|
||||||
|
|
||||||
Then, append this snippet to your `.travis.yml` and update the path to the
|
Then, append this snippet to your `.travis.yml` and update the path to the
|
||||||
`book` directory:
|
`book` directory:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
deploy:
|
deploy:
|
||||||
provider: pages
|
provider: pages
|
||||||
skip-cleanup: true
|
strategy: git
|
||||||
|
edge: true
|
||||||
|
cleanup: false
|
||||||
github-token: $GITHUB_TOKEN
|
github-token: $GITHUB_TOKEN
|
||||||
local-dir: path/to/mybook/book
|
local-dir: path/to/mybook/book
|
||||||
keep-history: false
|
keep-history: false
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
|
target_branch: gh-pages
|
||||||
```
|
```
|
||||||
|
|
||||||
That's it!
|
That's it!
|
||||||
|
|
Loading…
Reference in New Issue