Skip to content

Instantly share code, notes, and snippets.

@mryellow
Last active July 30, 2016 06:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mryellow/6ea726cf3842bb31fec596fc1a960423 to your computer and use it in GitHub Desktop.
CircleCI Jekyll Github pages
general:
branches:
only:
- production
deployment:
production:
branch: production
commands:
- git config --global user.name "${CIRCLE_PROJECT_USERNAME}"
- git config --global user.email "${CIRCLE_PROJECT_USERNAME}@${CIRCLE_PROJECT_USERNAME}"
- git fetch origin --unshallow
- git checkout -b deploy
- bundler exec jekyll build
- git add -f _site/
- git commit -a -m "Deploy"
- git checkout gh-pages
- git checkout deploy _site/**
- rsync -av _site/ .
- rm -rf _site
- git add . && git commit -a -m "Deploy ${CIRCLE_BUILD_NUM}" && git push origin gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment