Skip to content

Commit c3c92eb

Browse files
committed
Use a deploy key instead of a personal access token
1 parent 10a6334 commit c3c92eb

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.travis.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
language: rust
2+
before_install:
3+
- openssl aes-256-cbc -K $encrypted_1cc96cfefdcd_key -iv $encrypted_1cc96cfefdcd_iv -in rfcs-publish-key.enc -out ~/.ssh/rfcs-publish-key -d
4+
- chmod u=rw,og= ~/.ssh/rfcs-publish-key
5+
- echo "Host github.com" >> ~/.ssh/config
6+
- echo " IdentityFile ~/.ssh/rfcs-publish-key" >> ~/.ssh/config
7+
- git --version
28
script:
9+
- rev=$(git rev-parse --short HEAD)
310
- (cargo install mdbook --git https://github.com/azerupi/mdBook.git --force || true)
411
- ./generate-book.sh
5-
- mv book/* .
6-
deploy:
7-
provider: pages
8-
skip_cleanup: true
9-
github_token: $GITHUB_TOKEN
10-
on:
11-
branch: master
12+
- cd book
13+
- git init
14+
- git config --global user.name "bors"
15+
- git config --global user.email "[email protected]"
16+
- git remote add upstream [email protected]:rust-lang/rfcs.git
17+
- git fetch upstream
18+
- git reset upstream/gh-pages
19+
- touch .
20+
- git add -A .
21+
- git commit -m "Rebuild book at ${rev}"
22+
- git push -q upstream HEAD:gh-pages > /dev/null 2>&1
23+
branches:
24+
only:
25+
- master
26+

rfcs-publish-key.enc

1.64 KB
Binary file not shown.

0 commit comments

Comments
 (0)