rust-book-cn/deploy.sh

22 lines
396 B
Bash
Raw Normal View History

#!/bin/bash
set -o errexit -o nounset
rev=$(git rev-parse --short HEAD)
cd book
git init
2017-02-04 18:10:17 +08:00
git config user.name "Aaklo Xu"
git config user.email "aakloxu@gmail.com"
2017-02-04 18:10:17 +08:00
git remote add upstream "git@github.com:rust-lang-cn/book-cn.git"
git fetch upstream
git reset upstream/gh-pages
touch .
git add -A .
git commit -m "rebuild pages at ${rev}"
git push -q upstream HEAD:gh-pages > /dev/null 2>&1