Skip to content

Travis

Continuous Integration software can build and deploy software from source automatically.

This can be done on the master repo to check if code can be built on all machine set, and also on a tag release to build packages to upload for a release, like on GitHub Releases.

As stated here on 2018-05-02 all new repository must be registered using travis.com instead travis.org.

The following guide is based on the use of the travis tool, which can be installed for the current user with:

$ gem install travis

GitHub Pages

Travis CI can deploy your static files to GitHub Pages after a successful build.

You will need to provide a personal access token and set the deployment provider details in .travis.yml.

For a minimal configuration, add the following to your .travis.yml:

deploy:
  provider: pages
  skip_cleanup: true
  github_token: $GITHUB_TOKEN  # Set in the settings page of your repository, as a secure variable
  keep_history: true
  on:
    branch: master

See: - Authenticating with an OAuth token - Best Practices in Securing Your Data - Travis CI Encryption Keys

GitHub Releases

Other than build on each master repo push, it's possible to build and deploy packages to upload automatically on GitHub releases page. The configuration can be set automatically running:

$ travis setup releases --com
See: GitHub Releases Uploading