• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2
3GIT_URL=`git remote show origin | awk '/Push  URL/ { print $NF }'`
4DEPLOY_DIR=/tmp/deploy.$$
5mkdir ${DEPLOY_DIR}
6(cd ${DEPLOY_DIR} ; \
7    git clone ${GIT_URL} . \
8 && git checkout gh-pages \
9 && git rm -rf .
10)
11cp -r _build/html/* ${DEPLOY_DIR}
12touch ${DEPLOY_DIR}/.nojekyll
13(cd ${DEPLOY_DIR} ; \
14    git add .nojekyll *  \
15    && git commit -m "deploy"  \
16    && git push)
17
18rm -rf ${DEPLOY_DIR}
19