git-secret/utils/gh-branch.sh

20 lines
283 B
Bash
Raw Normal View History

2016-02-23 21:11:37 +00:00
#!/usr/bin/env bash
2016-02-23 21:25:39 +00:00
set -e
2016-02-23 21:11:37 +00:00
function update_gh_branch {
2016-07-02 10:24:32 +00:00
local branch_name
branch_name=$(git branch | grep '\*' | sed 's/* //')
git checkout 'gh-pages'
2016-02-23 21:11:37 +00:00
make
2016-02-23 21:25:39 +00:00
git add --all '_posts'
2016-02-23 21:25:39 +00:00
git commit -m 'documentation update'
2016-03-13 11:09:47 +00:00
git checkout "$branch_name"
2016-02-23 21:11:37 +00:00
}
update_gh_branch