Travis integration with Github

Travis is a CI/CD tool originally made for open source projects. Now there is also an offering for commercial/private repositories tool, travis-ci.com (versus org). I used Travis for this site (deployed on Github pages) and for my main site (deployed with Heroku).

On Github side

  • On the repo you want to publish, go to Settings -> Integrations & services and add a new Service: username: spygi (I guess this is of Travis?), token from your Travis profile, domain: notify.travis-ci.org. Test the service to check if it works.
  • Generate a Github token. You need only repo and admin:repo_hook rights I think.

On Travis side

Locally

  • Generate a .travis.yml file e.g. the one used for this site.
  • gem install travis
  • Within the repo: travis encrypt 'GIT_NAME="YOUR_USERNAME" GIT_EMAIL="YOUR_EMAIL" GH_TOKEN=YOUR_TOKEN' and put it into the .travis.yml
  • Push and check status on https://travis-ci.org/USERNAME/REPO.