Add redirect from top-level index.html

This commit is contained in:
David Tolnay 2016-02-24 23:31:31 -08:00
parent 73ba328e85
commit 510a16bcce
3 changed files with 19 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
docs
target
Cargo.lock

14
docs/index.html Normal file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0;url=https://dtolnay.github.io/serde-yaml/serde_yaml/">
<script type="text/javascript">
window.location.href = "https://dtolnay.github.io/serde-yaml/serde_yaml/"
</script>
<title>serde-yaml</title>
</head>
<body>
<a href="https://dtolnay.github.io/serde-yaml/serde_yaml/">https://dtolnay.github.io/serde-yaml/serde_yaml/</a>
</body>
</html>

View File

@ -19,13 +19,14 @@ mkdir -p ~/.ssh
openssl aes-256-cbc -K $key -iv $iv -in scripts/upload_key.enc -out ~/.ssh/id_rsa -d
chmod 600 ~/.ssh/id_rsa
git clone --branch gh-pages git@github.com:$TRAVIS_REPO_SLUG docs
# TODO use --depth=1 once on git 1.9
git clone --branch gh-pages git@github.com:$TRAVIS_REPO_SLUG docs.tmp
mv docs.tmp/.git docs
mv target/doc/* docs
cd docs
git config user.name "autogenerated docs"
git config user.email "docs@dtolnay.github.io"
git rm -q --ignore-unmatch '*'
mv ../target/doc/* .
git add -A .
git commit -qm "Autogenerated docs for $TRAVIS_REPO_SLUG"
git push -q origin gh-pages