/deployment-circleci-gh-pages

CircleCi and Github Pages integration...:computer: :zap: :thought_balloon:

Primary LanguageHTML

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:

¿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:

Enviroment Variable - Villanuevand

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

MIT License.

Copyright (c) 2016 Andrés Villanueva.