2014-01-27 12:42:38 +01:00
|
|
|
#!/bin/bash
|
2014-02-24 19:35:06 +01:00
|
|
|
set -ex
|
2014-01-27 12:42:38 +01:00
|
|
|
|
2014-01-28 01:16:29 +01:00
|
|
|
script/build-docs
|
|
|
|
|
2014-01-27 13:26:33 +01:00
|
|
|
pushd docs/_site
|
2014-01-27 12:42:38 +01:00
|
|
|
|
|
|
|
export GIT_DIR=.git-gh-pages
|
|
|
|
export GIT_WORK_TREE=.
|
|
|
|
|
|
|
|
if [ ! -d "$GIT_DIR" ]; then
|
|
|
|
git init
|
|
|
|
fi
|
|
|
|
|
|
|
|
if !(git remote | grep origin); then
|
2014-08-07 23:42:49 +02:00
|
|
|
git remote add origin git@github.com:docker/fig.git
|
2014-01-27 12:42:38 +01:00
|
|
|
fi
|
|
|
|
|
2014-01-27 22:43:37 +01:00
|
|
|
git fetch origin
|
|
|
|
git reset --soft origin/gh-pages
|
|
|
|
|
2014-01-27 13:26:33 +01:00
|
|
|
echo ".git-gh-pages" > .gitignore
|
2014-01-27 12:42:38 +01:00
|
|
|
|
2014-05-09 11:59:44 +02:00
|
|
|
git add -A .
|
2014-01-27 12:42:38 +01:00
|
|
|
|
|
|
|
git commit -m "update" || echo "didn't commit"
|
2014-01-27 22:43:37 +01:00
|
|
|
git push origin master:gh-pages
|
2014-01-27 12:42:38 +01:00
|
|
|
|
|
|
|
popd
|