{"id":238357,"date":"2022-04-25T08:54:00","date_gmt":"2022-04-25T12:54:00","guid":{"rendered":"https:\/\/wordpress-756359-3782526.cloudwaysapps.com\/?p=238357"},"modified":"2025-05-30T07:28:08","modified_gmt":"2025-05-30T07:28:08","slug":"2022-04-25-autopublish","status":"publish","type":"post","link":"https:\/\/www.travis-ci.com\/blog\/2022-04-25-autopublish\/","title":{"rendered":"Auto publish your data using Travis"},"content":{"rendered":"\n<p>What if our goal is to on every commit is to trigger a publishing to \u2018master\u2019 branch or another base branch?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"getting-started\">Getting started<\/h2>\n\n\n\n<p>So you\u2019ll need to tell Travis to grab a package called&nbsp;<code>DataHub<\/code>&nbsp;in your&nbsp;<code>.travis.yml<\/code>, then in your script tell DataHub to push, let me give you an example&nbsp;<code>.travis.yml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>language: node_js\nnode_js:\n  - \"8\"\ninstall: npm install -g data-cli\nscript: data push --public\nbranches:\n  only:\n  - master<\/code><\/pre>\n\n\n\n<p>You\u2019ll see we called to install&nbsp;<code>data-cli<\/code>&nbsp;globally &#8211; once that was met, we used a script hook to run&nbsp;<code>data push --public<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"environment-variables\">Environment Variables<\/h2>\n\n\n\n<p>You\u2019ll need your environment variables from DataHub, so before you start building grab those or your build will end up breaking.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>As always, if you have any questions, please email me at&nbsp;<a href=\"mailto:montana@travis-ci.org\">montana@travis-ci.org<\/a>&nbsp;for help.<\/p>\n\n\n\n<p>Happy building!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What if our goal is to on every commit is to trigger a publishing to \u2018master\u2019 branch or another base branch? Getting started So you\u2019ll need to tell Travis to grab a package called&nbsp;DataHub&nbsp;in your&nbsp;.travis.yml, then in your script tell DataHub to push, let me give you an example&nbsp;.travis.yml: You\u2019ll see we called to install&nbsp;data-cli&nbsp;globally [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_breakdance_hide_in_design_set":false,"_breakdance_tags":"","footnotes":""},"categories":[16],"tags":[7,19,20,5],"class_list":["post-238357","post","type-post","status-publish","format-standard","hentry","category-news","tag-community","tag-feature","tag-infrastructure","tag-news"],"_links":{"self":[{"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/posts\/238357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/comments?post=238357"}],"version-history":[{"count":1,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/posts\/238357\/revisions"}],"predecessor-version":[{"id":242651,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/posts\/238357\/revisions\/242651"}],"wp:attachment":[{"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/media?parent=238357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/categories?post=238357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/tags?post=238357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}