Auto publish your data using Travis

written by

reviewed by

Share
Contents

written by

reviewed by

What if our goal is to on every commit is to trigger a publishing to ‘master’ branch or another base branch?

Getting started

So you’ll need to tell Travis to grab a package called DataHub in your .travis.yml, then in your script tell DataHub to push, let me give you an example .travis.yml:

language: node_js
node_js:
  - "8"
install: npm install -g data-cli
script: data push --public
branches:
  only:
  - master

You’ll see we called to install data-cli globally – once that was met, we used a script hook to run data push --public.

Environment Variables

You’ll need your environment variables from DataHub, so before you start building grab those or your build will end up breaking.

Conclusion

As always, if you have any questions, please email me at [email protected] for help.

Happy building!

written by

reviewed by

Share this article

Related Articles

Welcome to the New Travis CI

The new look, the new site, and this new developer-first direction mark the beginning of a new era for Travis…

Docker Swarm vs Kubernetes

Among all the tools aimed at orchestrating containers, the two leading players are Docker Swarm and Kubernetes. Both provide solutions…

Simple to start. 
Intuitive to extend.

Simple to start.

Intuitive to extend.

Developed upon by hundreds of thousands.
Newsletter
Get tips, promotions and exclusive offers
© Copyright 2026, All Rights Reserved