{
  "attachments": [],
  "title": "Continual Blogployment",
  "tags": [
    "metablogging",
    "webdev",
    "js",
    "gulp",
    "github",
    "travis",
    "s3",
    "amazon",
    "devops"
  ],
  "year": "2015",
  "month": "10",
  "day": "22",
  "isDir": false,
  "slug": "blogging-via-travis",
  "type": "entry",
  "date": "2015-10-22T19:00:00.000Z",
  "postName": "2015-10-22-blogging-via-travis",
  "html": "<p>Ever since <a href=\"http://blog.lmorchard.com/2014/10/20/static-blog-generation-with-gulp/\">I switched this blog over to a Gulp-based toolchain</a> - <em>holy crap, 2 years ago</em> - I had a TODO to wire this thing up for continual deployment. Well, today I finally did it. </p>\n<!--more-->\n\n\n\n<p>Just to test the cloud machinery I'm (ab)using here, I'm writing this post as a new commit on GitHub in a browser. When I get done and commit this, Travis CI will fire up, install my node-based blog code and build all the content. Assuming that goes well, my code on Travis will then publish any changes in the content to Amazon S3. And, voila, I will have blogged via the magic of cheap cloud infrastructure.</p>\n<p>Up until now, I've been doing this all from my laptop: Write a post in Vim, commit to git, build &amp; deploy from my local machine. I'd push to GitHub to work in the open and have a handy backup. But from here on, the push to GitHub will actually make the magic happen!</p>\n<p>If you're curious about the plumbing, <a href=\"https://github.com/lmorchard/blog.lmorchard.com/compare/5992311ade7acc0e9dbeb0352ac4097c687be1a5...10149c0e520f7e75536535ff563dfe42aa30b960\">the changes in my recent commits</a> can tell the exact story. But, what I did in a nutshell is this:</p>\n<ul>\n<li><a href=\"https://github.com/lmorchard/blog.lmorchard.com/commit/4c029ab9a6d3f5869cee02b7265e0ad41908a8c4\">Switched to using environment vars to configure AWS credentials for S3 publishing</a>.</li>\n<li>Used <a href=\"http://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables\"><code>travis secure</code></a> to supply credentials in encrypted environment vars.</li>\n<li>Started <a href=\"https://github.com/lmorchard/blog.lmorchard.com/commit/4b525710760ad70c0d83d910585e7bd9ddd80583\">maintaining a copy of file hashes on the site</a> so that <a href=\"https://www.npmjs.com/package/gulp-awspublish\">gulp-awspublish</a> will only publish changes.</li>\n<li>Composed a <a href=\"https://github.com/lmorchard/blog.lmorchard.com/blob/master/.travis.yml\">.travis.yml</a> to build &amp; deploy everything.</li>\n</ul>\n<p>And, if you're reading this post, then that means everything worked when I hit the \"Commit new file\" button! (And, if you're reading <em>this</em> sentence, then I was able to update this post, too!)</p>\n",
  "body": "Ever since [I switched this blog over to a Gulp-based toolchain][gulp-blog] - *holy crap, 2 years ago* - I had a TODO to wire this thing up for continual deployment. Well, today I finally did it. \n\n<!--more-->\n\nJust to test the cloud machinery I'm (ab)using here, I'm writing this post as a new commit on GitHub in a browser. When I get done and commit this, Travis CI will fire up, install my node-based blog code and build all the content. Assuming that goes well, my code on Travis will then publish any changes in the content to Amazon S3. And, voila, I will have blogged via the magic of cheap cloud infrastructure.\n\nUp until now, I've been doing this all from my laptop: Write a post in Vim, commit to git, build & deploy from my local machine. I'd push to GitHub to work in the open and have a handy backup. But from here on, the push to GitHub will actually make the magic happen!\n\nIf you're curious about the plumbing, [the changes in my recent commits][recent-commits] can tell the exact story. But, what I did in a nutshell is this:\n\n* [Switched to using environment vars to configure AWS credentials for S3 publishing][env-config].\n* Used [`travis secure`][travis-secure] to supply credentials in encrypted environment vars.\n* Started [maintaining a copy of file hashes on the site][hash-stash] so that [gulp-awspublish][] will only publish changes.\n* Composed a [.travis.yml][travis-yml] to build & deploy everything.\n\nAnd, if you're reading this post, then that means everything worked when I hit the \"Commit new file\" button! (And, if you're reading *this* sentence, then I was able to update this post, too!)\n\n[env-config]: https://github.com/lmorchard/blog.lmorchard.com/commit/4c029ab9a6d3f5869cee02b7265e0ad41908a8c4\n[gulp-awspublish]: https://www.npmjs.com/package/gulp-awspublish\n[hash-stash]: https://github.com/lmorchard/blog.lmorchard.com/commit/4b525710760ad70c0d83d910585e7bd9ddd80583\n[travis-yml]: https://github.com/lmorchard/blog.lmorchard.com/blob/master/.travis.yml\n[travis-secure]: http://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables\n[recent-commits]: https://github.com/lmorchard/blog.lmorchard.com/compare/5992311ade7acc0e9dbeb0352ac4097c687be1a5...10149c0e520f7e75536535ff563dfe42aa30b960\n[gulp-blog]: http://blog.lmorchard.com/2014/10/20/static-blog-generation-with-gulp/\n",
  "parentPath": "./content/posts/archives/2015",
  "path": "2015/10/22/blogging-via-travis",
  "summary": "Ever since I switched this blog over to a Gulp-based toolchain - holy crap, 2 years ago - I had a TODO to wire this thing up for continual deployment. Well, today I finally did it.",
  "needsBuild": true,
  "prevPostPath": "2015/10/18/being-nice-at-alterconf",
  "prevPostTitle": "Being nice at AlterConf",
  "nextPostPath": "2015/10/28/catbearcoin",
  "nextPostTitle": "Catbearcoin, a web science fiction story"
}