deployment-circleci-gh-pages
deployment-circleci-gh-pages copied to clipboard
CircleCi and Github Pages integration...:computer: :zap: :thought_balloon:
Circle CI and Github Pages.
Playing with CircleCi to deploy automatically projects to gh-pages.
You can see the results here. ¡Say hi to the cat!.
Special thanks to:
- Eldarlabs github organization, for the repo eldarlabs/ghpages-deploy-script.
- @jcouyang for circle.yml gist.
- @motemen for push-gh-pages.sh gist.
¿How can i do it?
Configure user Machine at Circle CI.
Go to this link and follow the instructions. ¡Are really simple!
Create the circle.yml file
You can configurate the circle.yml file to you needs, in this link. But, i used the followed circle.yml file.
Create deploy.sh script
I use this deploy.sh script courtesy of @eldarlabs.
Configure Circle CI variable enviroment
The script also seems to require you to init the git user and email. To hide this information, the script will grab the information from circleci environment variable. You will need to configure environment variables GH_NAME (GitHub Name) and GH_EMAIL (GitHub Email).
But.. ¿How can i do that?
- Really simple just go to CircleCi
- Click on project settings => Build Settings => Enviroment Variables
- Add 2 new enviroment variables:
- GH_NAME (GitHub Name) .
- GH_EMAIL (GitHub Email).
Reference Image - Enviroment Variables Configuration:
Push any change to master
branch, check the build in Circle Ci, and enjoy how push automatically to your gh-page
branch.
¡Feel free to contribute!
License
Copyright (c) 2016 Andrés Villanueva.