Skip to content

Commit cbfd75a

Browse files
authored
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.
1 parent eaa6914 commit cbfd75a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

guide/src/continuous-integration.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ run.
1212

1313
```yaml
1414
language: rust
15-
sudo: false
15+
os: linux
16+
dist: xenial
1617

1718
cache:
1819
- cargo
@@ -39,18 +40,24 @@ permissions (or "repo" for private repositories). Go to your repository's Travis
3940
CI settings page and add an environment variable named `GITHUB_TOKEN` that is
4041
marked secure and *not* shown in the logs.
4142

43+
Whilst still in your repository's settings page, navigate to Options and change the
44+
Source on GitHub pages to `gh-pages`.
45+
4246
Then, append this snippet to your `.travis.yml` and update the path to the
4347
`book` directory:
4448

4549
```yaml
4650
deploy:
4751
provider: pages
48-
skip-cleanup: true
52+
strategy: git
53+
edge: true
54+
cleanup: false
4955
github-token: $GITHUB_TOKEN
5056
local-dir: path/to/mybook/book
5157
keep-history: false
5258
on:
5359
branch: master
60+
target_branch: gh-pages
5461
```
5562

5663
That's it!

0 commit comments

Comments
 (0)