Last active
July 30, 2016 06:06
-
-
Save mryellow/6ea726cf3842bb31fec596fc1a960423 to your computer and use it in GitHub Desktop.
CircleCI Jekyll Github 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: | |
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