Skip to content

Commit 437188d

Browse files
committed
1 parent 00ebb78 commit 437188d

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
language: rust
22
rust:
33
- nightly
4+
5+
after_success: cargo doc && sh scripts/travis-doc-upload.sh

scripts/id_rsa.enc

1.64 KB
Binary file not shown.

scripts/travis-doc-upload.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PROJECT_NAME=linked-list-allocator
2+
DOCS_REPO=phil-opp/linked-list-allocator.git
3+
SSH_KEY_TRAVIS_ID=5046af79ab8b

scripts/travis-doc-upload.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
# License: CC0 1.0 Universal
4+
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
5+
6+
set -e
7+
8+
. scripts/travis-doc-upload.cfg
9+
10+
[ "$TRAVIS_BRANCH" = master ]
11+
12+
[ "$TRAVIS_PULL_REQUEST" = false ]
13+
14+
eval key=\$encrypted_${SSH_KEY_TRAVIS_ID}_key
15+
eval iv=\$encrypted_${SSH_KEY_TRAVIS_ID}_iv
16+
17+
mkdir -p ~/.ssh
18+
openssl aes-256-cbc -K $key -iv $iv -in scripts/id_rsa.enc -out ~/.ssh/id_rsa -d
19+
chmod 600 ~/.ssh/id_rsa
20+
21+
git clone --branch gh-pages git@github.com:$DOCS_REPO deploy_docs
22+
23+
cd deploy_docs
24+
git config user.name "travis update bot"
25+
git config user.email "travis-update-bot@phil-opp.com"
26+
rm -rf *
27+
mv ../target/doc/* .
28+
git add -A .
29+
git commit -qm "update docs to $TRAVIS_COMMIT"
30+
git push -q origin gh-pages

0 commit comments

Comments
 (0)