Files
react-native-paper/docs/deploy.sh
Satyajit Sahoo 70cf03b4d9 docs: fix deploy
2016-11-25 11:00:16 +05:30

23 lines
491 B
Bash
Executable File

#!/bin/bash
set -e
git clone https://${GITHUB_TOKEN}@github.com/react-native-paper/react-native-paper.github.io.git docs/dist
rm -rf docs/dist/**
cd docs && npm run build && cd dist
if [ -z "$(git diff --exit-code)" ]; then
echo "No changes to the output on this push; exiting."
exit 0
fi
git config user.name "Travis CI"
git config user.email "bot@travis-ci.org"
git add -A .
git commit -m "Deploy documentation: $(git rev-parse --verify HEAD)"
git push -f -u origin master