Suggest dplyv2 changes to .travis.yml as a note
This is following @ehuss' comment to not recommend something currently in beta release.
This commit is contained in:
parent
e310dfc605
commit
75d0f1efd4
|
@ -12,8 +12,7 @@ run.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
language: rust
|
language: rust
|
||||||
os: linux
|
sudo: false
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- cargo
|
- cargo
|
||||||
|
@ -47,6 +46,39 @@ Then, append this snippet to your `.travis.yml` and update the path to the
|
||||||
`book` directory:
|
`book` directory:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
deploy:
|
||||||
|
provider: pages
|
||||||
|
skip-cleanup: true
|
||||||
|
github-token: $GITHUB_TOKEN
|
||||||
|
local-dir: path/to/mybook/book
|
||||||
|
keep-history: false
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
```
|
||||||
|
|
||||||
|
That's it!
|
||||||
|
|
||||||
|
Note: Travis has a new [dplv2](https://blog.travis-ci.com/2019-08-27-deployment-tooling-dpl-v2-preview-release) configuration that is currently in beta. To use this new format, update your `.travis.yml` file to:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
language: rust
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- cargo
|
||||||
|
|
||||||
|
rust:
|
||||||
|
- stable
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
||||||
|
- (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.3" mdbook)
|
||||||
|
- cargo install-update -a
|
||||||
|
|
||||||
|
script:
|
||||||
|
- mdbook build path/to/mybook && mdbook test path/to/mybook
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: pages
|
provider: pages
|
||||||
strategy: git
|
strategy: git
|
||||||
|
@ -60,8 +92,6 @@ deploy:
|
||||||
target_branch: gh-pages
|
target_branch: gh-pages
|
||||||
```
|
```
|
||||||
|
|
||||||
That's it!
|
|
||||||
|
|
||||||
### Deploying to GitHub Pages manually
|
### Deploying to GitHub Pages manually
|
||||||
|
|
||||||
If your CI doesn't support GitHub pages, or you're deploying somewhere else
|
If your CI doesn't support GitHub pages, or you're deploying somewhere else
|
||||||
|
|
Loading…
Reference in New Issue