Created
June 21, 2015 03:25
-
-
Save vtsatskin/fa983d87f76ff27c93e4 to your computer and use it in GitHub Desktop.
Deploying wbkd/react-starterkit to gh-pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
general: | |
branches: | |
ignore: | |
- gh-pages | |
dependencies: | |
override: | |
- npm install | |
- bower install | |
test: | |
override: | |
- echo 'no tests' | |
deployment: | |
production: | |
branch: master | |
commands: | |
- ./deploy.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEPLOY_INFO=`git log --pretty=format:'%h by %an on %aD' -n 1` | |
gulp build --type production | |
cd ../ | |
git clone -b gh-pages --depth 1 <GITHUB SSH REPO URL> ./production | |
cd production | |
# Delete all files and copy fresh build to ensure deleted files don't linger | |
git rm -r * | |
cp -r ../<REPO NAME>/dist/* ./ | |
# Create commit and push to gh-pages | |
git add . | |
git config user.email "auto-deploy@<YOUR DOMAIN>.com" | |
git config user.name "Automated Deployer" | |
git commit -m "[DEPLOYMENT] $DEPLOY_INFO" | |
git push origin gh-pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment