{
    "componentChunkName": "component---src-templates-blog-post-jsx",
    "path": "/post/automate-deploy-to-rubygems-with-circleci/",
    "result": {"data":{"site":{"siteMetadata":{"title":"WEB EGG","author":"Leko - CTO at Yuimedi"}},"markdownRemark":{"id":"1f76c023-1d0f-5699-acd5-ce61280f5ad2","excerpt":"ActiveResourceでChatWorkのAPIを叩くgemを作ってみました。 これが初めて作ったgemなのですが、手で運用すると色々忘れそうな感じがした。 ライブラリのメンテはただでさえ手がかかるので、パッケージ管理サービスへのデプロイくらい手を抜きたい。 ということで、Githubのmaster…","html":"<p><a href=\"/post/knowhow-of-chatwork-api-with-activeresource/\">ActiveResourceでChatWorkのAPIを叩くgem</a>を作ってみました。<br>\nこれが初めて作ったgemなのですが、手で運用すると色々忘れそうな感じがした。</p>\n<p>ライブラリのメンテはただでさえ手がかかるので、パッケージ管理サービスへのデプロイくらい手を抜きたい。<br>\nということで、GithubのmasterブランチにpushされたらCircleCIを使って自動でgemをデプロイする設定をしてみました。</p>\n<!--more-->\n<h2 id=\"作ったもの\" style=\"position:relative;\"><a href=\"#%E4%BD%9C%E3%81%A3%E3%81%9F%E3%82%82%E3%81%AE\" aria-label=\"作ったもの permalink\" class=\"autolink-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>作ったもの</h2>\n<p>作ったgemのリポジトリを御覧ください。circle.ymlにかかれています</p>\n<blockquote>\n<p><a href=\"https://github.com/Leko/activeresource-chatwork\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GitHub – Leko/activeresource-chatwork: ActiveResource classes for ChatWork API</a></p>\n</blockquote>\n<h2 id=\"gemのデプロイ手順\" style=\"position:relative;\"><a href=\"#gem%E3%81%AE%E3%83%87%E3%83%97%E3%83%AD%E3%82%A4%E6%89%8B%E9%A0%86\" aria-label=\"gemのデプロイ手順 permalink\" class=\"autolink-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>gemのデプロイ手順</h2>\n<p>まずは自動化すべきタスクの内容をおさらいします。<br>\nRakeタスクにデプロイコマンドがくっついているので、それを利用します。</p>\n<ol>\n<li><a href=\"https://rubygems.org/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">rubygems.org</a>にユーザ登録</li>\n<li>ログインして<a href=\"https://rubygems.org/profile/edit\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Edit Profile</a>へ移動</li>\n<li><strong>API ACCESS</strong> という節にコマンドが書かれているので、それを実行</li>\n</ol>\n<p>これで公開準備は完了しました。ここまでの操作は最初の1回で良いようです。<br>\nデプロイ自体は</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">bundle exec rake build\nbundle exec rake release</code></pre></div>\n<p>という感じでいけるそうです。こんなフローを自動化してみます。</p>\n<h2 id=\"circleciにuser-keyを追加する\" style=\"position:relative;\"><a href=\"#circleci%E3%81%ABuser-key%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B\" aria-label=\"circleciにuser keyを追加する permalink\" class=\"autolink-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>CircleCIにuser keyを追加する</h2>\n<p>CircleCIと連携したままのだと、read onlyなデプロイキーが使用されています。<br>\nなのでリポジトリからpullはできるのですが、タグの追加やpushができない。</p>\n<p><code>bundle exec rake release</code>は内部的に<code>git tag</code>と<code>git push origin タグ</code>をやっているので、リポジトリへのwrite権限が必要になります。<br>\nということでまずはそこの準備を整える。</p>\n<ol>\n<li>CircleCIの対象プロジェクトの <strong>Project Settings</strong> を開く</li>\n<li><strong>PERMISSIONS > Checkout SSH keys</strong> を選択</li>\n<li><strong>Create and add {ユーザ名} user key</strong> を選択</li>\n</ol>\n<p>で、連携しているリポジトリにwrite権限を持つキーが作成できます。<br>\nこんな感じの画面になればOKだと思います。</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 668px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/f2115e7658067fd2c45814fd85f3f6bc/7161f/5aad2dde2722e323044dce1b2cd9bc04.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 29.34131736526946%; position: relative; bottom: 0; left: 0; background-image: url('data:image/svg+xml,%3csvg%20xmlns=\\'http://www.w3.org/2000/svg\\'%20width=\\'400\\'%20height=\\'118\\'%20viewBox=\\'0%200%20400%20118\\'%20preserveAspectRatio=\\'none\\'%3e%3cpath%20d=\\'M114%208l-9%201-8%201h-1L86%209H67c-2%200-3%201-3%202s1%202%206%202l5-1h8c0-2%200-2%201%200h4l3%201c2%200%203-1%202-2h1l4%202%202-2h1c1%202%206%202%207%201h2c2%201%204%201%205-1h1c0%202%206%202%207%201h1c0%201%2012%201%2013-1s-1-4-2-3c-2%201-11%202-12%201s-5%200-5%201l-2-1-2-1m59%2031h-4c-3%200-5%202-3%203h46l3%201%203-1h1c1%201%209%201%209-1h1c0%202%201%202%201%201%202-2%200-4-2-3h-8l-6%201-2-1h-2a199%20199%200%2001-37%200\\'%20fill=\\'%23d3d3d3\\'%20fill-rule=\\'evenodd\\'/%3e%3c/svg%3e'); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/f2115e7658067fd2c45814fd85f3f6bc/5251b/5aad2dde2722e323044dce1b2cd9bc04.webp 167w,\n/static/f2115e7658067fd2c45814fd85f3f6bc/7390e/5aad2dde2722e323044dce1b2cd9bc04.webp 334w,\n/static/f2115e7658067fd2c45814fd85f3f6bc/7c056/5aad2dde2722e323044dce1b2cd9bc04.webp 668w,\n/static/f2115e7658067fd2c45814fd85f3f6bc/0a92e/5aad2dde2722e323044dce1b2cd9bc04.webp 1002w,\n/static/f2115e7658067fd2c45814fd85f3f6bc/575d1/5aad2dde2722e323044dce1b2cd9bc04.webp 1182w\"\n              sizes=\"(max-width: 668px) 100vw, 668px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/f2115e7658067fd2c45814fd85f3f6bc/21521/5aad2dde2722e323044dce1b2cd9bc04.png 167w,\n/static/f2115e7658067fd2c45814fd85f3f6bc/86d36/5aad2dde2722e323044dce1b2cd9bc04.png 334w,\n/static/f2115e7658067fd2c45814fd85f3f6bc/74866/5aad2dde2722e323044dce1b2cd9bc04.png 668w,\n/static/f2115e7658067fd2c45814fd85f3f6bc/d69c4/5aad2dde2722e323044dce1b2cd9bc04.png 1002w,\n/static/f2115e7658067fd2c45814fd85f3f6bc/7161f/5aad2dde2722e323044dce1b2cd9bc04.png 1182w\"\n            sizes=\"(max-width: 668px) 100vw, 668px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/f2115e7658067fd2c45814fd85f3f6bc/74866/5aad2dde2722e323044dce1b2cd9bc04.png\"\n            alt=\"スクリーンショッ\"\n            title=\"スクリーンショッ\"\n            loading=\"lazy\"\n            decoding=\"async\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<h2 id=\"circleymlにデプロイ処理を追加する\" style=\"position:relative;\"><a href=\"#circleyml%E3%81%AB%E3%83%87%E3%83%97%E3%83%AD%E3%82%A4%E5%87%A6%E7%90%86%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B\" aria-label=\"circleymlにデプロイ処理を追加する permalink\" class=\"autolink-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>circle.ymlにデプロイ処理を追加する</h2>\n<p><code>deployment</code>セクションを追加して、<code>master</code>ブランチのビルドが走ったときのデプロイ処理を指定します。<br>\n私の場合RubyGemsのユーザもGit(hub)のユーザも<code>Leko</code>なので、以下のような内容になると思います。<br>\nパスワードやメールアドレスをリポジトリに載せたくないので、環境変数に切り出してProject settings画面から設定しています。</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">deployment</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">rubygems</span><span class=\"token punctuation\">:</span>        <span class=\"token comment\"># 任意の名前でよい</span>\n    <span class=\"token key atrule\">branch</span><span class=\"token punctuation\">:</span> master <span class=\"token comment\"># master相当のブランチが別名なら変えてください</span>\n    <span class=\"token key atrule\">commands</span><span class=\"token punctuation\">:</span>\n      <span class=\"token punctuation\">-</span> curl <span class=\"token punctuation\">-</span>u Leko<span class=\"token punctuation\">:</span>$RUBYGEMS_PASSWORD https<span class=\"token punctuation\">:</span>//rubygems.org/api/v1/api_key.yaml <span class=\"token punctuation\">></span> ~/.gem/credentials; chmod 0600 ~/.gem/credentials\n      <span class=\"token punctuation\">-</span> git config user.name Leko\n      <span class=\"token punctuation\">-</span> git config user.email $RUBYGEMS_EMAIL\n      <span class=\"token punctuation\">-</span> bundle exec rake build\n      <span class=\"token punctuation\">-</span> bundle exec rake release</code></pre></div>\n<h2 id=\"試す\" style=\"position:relative;\"><a href=\"#%E8%A9%A6%E3%81%99\" aria-label=\"試す permalink\" class=\"autolink-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>試す</h2>\n<p>CircleCI上の表示は</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 668px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/52216d482de09c85e2c6b2ca4294e70a/0d40b/e1084e909de8fec85c82e780658b59f3.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 25.74850299401198%; position: relative; bottom: 0; left: 0; background-image: url('data:image/svg+xml,%3csvg%20xmlns=\\'http://www.w3.org/2000/svg\\'%20width=\\'400\\'%20height=\\'103\\'%20viewBox=\\'0%200%20400%20103\\'%20preserveAspectRatio=\\'none\\'%3e%3cpath%20d=\\'M17%2071v23h372V48H17v23\\'%20fill=\\'%23d3d3d3\\'%20fill-rule=\\'evenodd\\'/%3e%3c/svg%3e'); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/52216d482de09c85e2c6b2ca4294e70a/5251b/e1084e909de8fec85c82e780658b59f3.webp 167w,\n/static/52216d482de09c85e2c6b2ca4294e70a/7390e/e1084e909de8fec85c82e780658b59f3.webp 334w,\n/static/52216d482de09c85e2c6b2ca4294e70a/7c056/e1084e909de8fec85c82e780658b59f3.webp 668w,\n/static/52216d482de09c85e2c6b2ca4294e70a/0a92e/e1084e909de8fec85c82e780658b59f3.webp 1002w,\n/static/52216d482de09c85e2c6b2ca4294e70a/92489/e1084e909de8fec85c82e780658b59f3.webp 1175w\"\n              sizes=\"(max-width: 668px) 100vw, 668px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/52216d482de09c85e2c6b2ca4294e70a/21521/e1084e909de8fec85c82e780658b59f3.png 167w,\n/static/52216d482de09c85e2c6b2ca4294e70a/86d36/e1084e909de8fec85c82e780658b59f3.png 334w,\n/static/52216d482de09c85e2c6b2ca4294e70a/74866/e1084e909de8fec85c82e780658b59f3.png 668w,\n/static/52216d482de09c85e2c6b2ca4294e70a/d69c4/e1084e909de8fec85c82e780658b59f3.png 1002w,\n/static/52216d482de09c85e2c6b2ca4294e70a/0d40b/e1084e909de8fec85c82e780658b59f3.png 1175w\"\n            sizes=\"(max-width: 668px) 100vw, 668px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/52216d482de09c85e2c6b2ca4294e70a/74866/e1084e909de8fec85c82e780658b59f3.png\"\n            alt=\"スクリーンショッ\"\n            title=\"スクリーンショッ\"\n            loading=\"lazy\"\n            decoding=\"async\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>デプロイした後のRubyGems.orgは</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 668px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/6b9c09911a1a695fbf5f30f41ce398ca/a4262/4c1c1aa1469d47ee9ae877356b7b87da.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 41.91616766467066%; position: relative; bottom: 0; left: 0; background-image: url('data:image/svg+xml,%3csvg%20xmlns=\\'http://www.w3.org/2000/svg\\'%20width=\\'400\\'%20height=\\'168\\'%20viewBox=\\'0%200%20400%20168\\'%20preserveAspectRatio=\\'none\\'%3e%3cpath%20d=\\'M33%2014l-1%203%202-1c3-3%208-2%208%202%200%202-1%202-3%202-6%200-9%203-7%206%201%203%201%203%206%203h6v-6c0-7-2-10-6-10l-5%201m61%201c-4%203-4%209%200%2012%202%202%208%202%209%200h-2c-3%202-7%200-8-3l-1-3h6c6%200%206%200%206-2%200-5-7-8-10-4m24%200c-5%205-2%2014%205%2014l4-1v-2l-1%201c-2%202-6%201-7-1-3-4-2-5%203-5%207%200%208-1%206-5s-8-4-10-1m29%200c-5%205-1%2014%205%2014%205%200%207-3%207-8%200-7-7-11-12-6m57%200c-3%203-3%209%200%2012%202%202%209%202%2010%200h-2c-4%202-7%201-8-4-1-2-1-2%205-2%205%200%206%200%206-2%200-5-7-8-11-4m55%200l-2%202%202-1c2-2%205-3%207%200%203%202%202%204-2%204-6%200-9%204-6%208h10c1%201%201-1%201-6l-1-8c-2-2-8-1-9%201m47%200c-5%205-2%2014%205%2014%205%200%207-3%207-8s-3-8-7-8l-5%202m-157%200l-2%204c-2%207%204%2012%209%207s0-14-7-11m159%200c-4%202-3%2011%201%2013%206%201%2010-5%207-10-2-4-5-5-8-3M51%2085l-7%201-2%202-1-1-1-2v2c0%202%201%203%202%203l1-1h4l3%201%202-1%202-1%201%201c0%202%209%201%2010-1l2-1-1%202c-1%201%200%201%202%201%203%200%204-1%204-2%200-2%200-2-1-1%200%202-1%202-1%201v-1l-9-2h-5l-2-1-3%201m145%2058h-1l-3%201h-1c0-2-3-1-3%201-1%202%202%204%203%202h2l2%201-1-2v-1l2%202h3l2-1%201%201h3l5-1h1c1%202%2010%202%2012%201h1c2%201%206%200%206-1h1c1%203%208%202%208-1%200-2-12-2-13%200h-1c0-2%200-2-1-1h-12l-12-1h-4\\'%20fill=\\'%23d3d3d3\\'%20fill-rule=\\'evenodd\\'/%3e%3c/svg%3e'); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/6b9c09911a1a695fbf5f30f41ce398ca/5251b/4c1c1aa1469d47ee9ae877356b7b87da.webp 167w,\n/static/6b9c09911a1a695fbf5f30f41ce398ca/7390e/4c1c1aa1469d47ee9ae877356b7b87da.webp 334w,\n/static/6b9c09911a1a695fbf5f30f41ce398ca/7c056/4c1c1aa1469d47ee9ae877356b7b87da.webp 668w,\n/static/6b9c09911a1a695fbf5f30f41ce398ca/f23e7/4c1c1aa1469d47ee9ae877356b7b87da.webp 814w\"\n              sizes=\"(max-width: 668px) 100vw, 668px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/6b9c09911a1a695fbf5f30f41ce398ca/21521/4c1c1aa1469d47ee9ae877356b7b87da.png 167w,\n/static/6b9c09911a1a695fbf5f30f41ce398ca/86d36/4c1c1aa1469d47ee9ae877356b7b87da.png 334w,\n/static/6b9c09911a1a695fbf5f30f41ce398ca/74866/4c1c1aa1469d47ee9ae877356b7b87da.png 668w,\n/static/6b9c09911a1a695fbf5f30f41ce398ca/a4262/4c1c1aa1469d47ee9ae877356b7b87da.png 814w\"\n            sizes=\"(max-width: 668px) 100vw, 668px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/6b9c09911a1a695fbf5f30f41ce398ca/74866/4c1c1aa1469d47ee9ae877356b7b87da.png\"\n            alt=\"スクリーンショッ\"\n            title=\"スクリーンショッ\"\n            loading=\"lazy\"\n            decoding=\"async\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>はい、OKそうです。</p>\n<h2 id=\"まとめ\" style=\"position:relative;\"><a href=\"#%E3%81%BE%E3%81%A8%E3%82%81\" aria-label=\"まとめ permalink\" class=\"autolink-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>まとめ</h2>\n<p>gem作るのもCircleCIのdeployment機能を使用したのも今回が始めてでした。<br>\nどちらも機能が充実しているもののシンプルに使えるようになっているので、学習コストは安かったと思います。</p>\n<p>思っていたよりもさくっとできて安心しました。<br>\ngemもCircleCIのデプロイも色々な方向に活用していきたいです。</p>\n<p>いつかnpmのデプロイ自動化も記事にしようと思います。</p>","timeToRead":4,"frontmatter":{"title":"RubygemsへのデプロイをCircleCIで自動化してみた","tags":["CircleCI","Ruby","Rubygems"],"date":"September 28, 2016","featuredImage":{"childImageSharp":{"fluid":{"tracedSVG":"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='400'%20height='103'%20viewBox='0%200%20400%20103'%20preserveAspectRatio='none'%3e%3cpath%20d='M17%2071v23h372V48H17v23'%20fill='%23d3d3d3'%20fill-rule='evenodd'/%3e%3c/svg%3e","aspectRatio":3.883720930232558,"src":"/static/52216d482de09c85e2c6b2ca4294e70a/d12c9/featured-image.png","srcSet":"/static/52216d482de09c85e2c6b2ca4294e70a/1ec58/featured-image.png 334w,\n/static/52216d482de09c85e2c6b2ca4294e70a/ccb4a/featured-image.png 668w,\n/static/52216d482de09c85e2c6b2ca4294e70a/d12c9/featured-image.png 1175w","srcWebp":"/static/52216d482de09c85e2c6b2ca4294e70a/d6561/featured-image.webp","srcSetWebp":"/static/52216d482de09c85e2c6b2ca4294e70a/cd98f/featured-image.webp 334w,\n/static/52216d482de09c85e2c6b2ca4294e70a/7535d/featured-image.webp 668w,\n/static/52216d482de09c85e2c6b2ca4294e70a/d6561/featured-image.webp 1175w","sizes":"(max-width: 1175px) 100vw, 1175px"}}}}}},"pageContext":{"slug":"/automate-deploy-to-rubygems-with-circleci/","previous":{"fields":{"slug":"/knowhow-of-chatwork-api-with-activeresource/"},"frontmatter":{"title":"ActiveResourceでChatWorkのAPIクライアントを作る際にハマったところと解決策","tags":["ActiveResource","ChatWork","Ruby"]}},"next":{"fields":{"slug":"/how-to-connect-database-with-database-uri-without-config/"},"frontmatter":{"title":"Railsでconfig/database.ymlを使わずURL文字列でDB接続したい","tags":["Go","Nodejs","Ruby","Ruby on Rails"]}}}},
    "staticQueryHashes": ["2585454260","2954598359"]}