Skip to content

Instantly share code, notes, and snippets.

@vtsatskin
Created June 21, 2015 03:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vtsatskin/fa983d87f76ff27c93e4 to your computer and use it in GitHub Desktop.
Save vtsatskin/fa983d87f76ff27c93e4 to your computer and use it in GitHub Desktop.
Deploying wbkd/react-starterkit to gh-pages
general:
branches:
ignore:
- gh-pages
dependencies:
override:
- npm install
- bower install
test:
override:
- echo 'no tests'
deployment:
production:
branch: master
commands:
- ./deploy.sh
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