redoc/build/prepare_deploy.sh
2016-05-10 12:32:54 +03:00

22 lines
374 B
Bash
Executable File

#!/bin/bash
set -e
set -x
# copy old releases
mkdir -p .ghpages-tmp && cd .ghpages-tmp
# reset local changes before checkout
git reset --hard
git fetch origin gh-pages:gh-pages
git checkout gh-pages
cp -R ../releases/* .
git checkout @{-1}
cd -
# build
gulp build
cd demo
cp -R ../dist/* ./dist/
mkdir -p releases
cp -R ../.ghpages-tmp/* ./releases/
cd -
gulp copy-version