Skip to content

Commit

Permalink
Use a deploy key instead of a personal access token
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Oct 31, 2017
1 parent 10a6334 commit c3c92eb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
language: rust
before_install:
- openssl aes-256-cbc -K $encrypted_1cc96cfefdcd_key -iv $encrypted_1cc96cfefdcd_iv -in rfcs-publish-key.enc -out ~/.ssh/rfcs-publish-key -d
- chmod u=rw,og= ~/.ssh/rfcs-publish-key
- echo "Host github.com" >> ~/.ssh/config
- echo " IdentityFile ~/.ssh/rfcs-publish-key" >> ~/.ssh/config
- git --version
script:
- rev=$(git rev-parse --short HEAD)
- (cargo install mdbook --git https://github.com/azerupi/mdBook.git --force || true)
- ./generate-book.sh
- mv book/* .
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
on:
branch: master
- cd book
- git init
- git config --global user.name "bors"
- git config --global user.email "bors@rust-lang.org"
- git remote add upstream git@github.com:rust-lang/rfcs.git
- git fetch upstream
- git reset upstream/gh-pages
- touch .
- git add -A .
- git commit -m "Rebuild book at ${rev}"
- git push -q upstream HEAD:gh-pages > /dev/null 2>&1
branches:
only:
- master

Binary file added rfcs-publish-key.enc
Binary file not shown.

0 comments on commit c3c92eb

Please sign in to comment.