forked from rust-lang-cn/book-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·38 lines (25 loc) · 748 Bytes
/
deploy.sh
File metadata and controls
executable file
·38 lines (25 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -o errexit -o nounset
rev=$(git rev-parse --short HEAD)
cd book
git init
git config user.name "Aaran Xu"
git config user.email "aaranxu@outlook.com"
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
cd ../english/book
git init
git config user.name "Aaran Xu"
git config user.email "aaranxu@outlook.com"
git remote add upstream "git@github.com:rust-lang-cn/book-cn.git"
git fetch upstream
git reset upstream/gh-pages-en
touch .
git add -A .
git commit -m "rebuild English pages at ${rev}"
git push -q upstream HEAD:gh-pages-en > /dev/null 2>&1