redoc/build/prepare_deploy.sh
2016-05-18 22:18:06 +03:00

22 lines
382 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
npm run build-dist
cd demo
cp -R ../dist/* ./dist/
mkdir -p releases
cp -R ../.ghpages-tmp/* ./releases/
cd -
gulp copy-version