{"id":1943,"date":"2017-12-08T00:00:14","date_gmt":"2017-12-07T15:00:14","guid":{"rendered":"https:\/\/blog.ymyzk.com\/?p=1943"},"modified":"2017-12-07T21:48:40","modified_gmt":"2017-12-07T12:48:40","slug":"ci-for-writing-papers","status":"publish","type":"post","link":"https:\/\/blog.ymyzk.com\/2017\/12\/ci-for-writing-papers\/","title":{"rendered":"\u8ad6\u6587\u57f7\u7b46\u3092\u652f\u3048\u308b\u7d99\u7d9a\u7684\u30a4\u30f3\u30c6\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3: Git \u304b\u3089 Amazon S3 \u307e\u3067"},"content":{"rendered":"
\u3053\u306e\u8a18\u4e8b\u306f CAMPHOR- Advent Calendar 2017<\/a>\u00a08\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\uff0e<\/p>\n \u5b66\u4f4d\u8ad6\u6587\u3092\u66f8\u304f\u5b63\u7bc0\u306b\u306a\u3063\u3066\u304d\u307e\u3057\u305f\uff0e\u8ad6\u6587\u3092\u66f8\u304f\u969b\u306b\u306f\u304d\u3061\u3093\u3068\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u3063\u3066\u304a\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306a\u3069\uff0c\u5b9f\u969b\u306e\u57f7\u7b46\u4ee5\u5916\u3067\u3082\u6c17\u3092\u9063\u308f\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3053\u3068\u304c\u591a\u304f\u3042\u308a\u307e\u3059\uff0e\u3053\u306e\u8a18\u4e8b\u3067\u306f\uff0c\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u306b\u304a\u3051\u308b\u7d99\u7d9a\u7684\u30a4\u30f3\u30c6\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3 (CI) \u3084\u7d99\u7d9a\u7684\u30c7\u30ea\u30d0\u30ea\u30fc (CD) \u306e\u8003\u3048\u65b9\u3092\u53d6\u308a\u5165\u308c\uff0c\u69d8\u3005\u306a\u30c4\u30fc\u30eb\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\uff0c\u8ad6\u6587\u306e\u57f7\u7b46\u306b\u96c6\u4e2d\u3067\u304d\u308b\u74b0\u5883\u3092\u6574\u5099\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e<\/p>\n <\/p>\n \u57fa\u672c\u7684\u306b TeX \u3092\u4f7f\u3063\u3066\u8ad6\u6587\u3092\u66f8\u304f\u4eba\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\uff0e(Word \u306a\u3069\u3067\u8ad6\u6587\u3092\u66f8\u304b\u3056\u308b\u3092\u5f97\u306a\u3044\u74b0\u5883\u306b\u3044\u308b\u65b9\u306b\u306f\u7533\u3057\u8a33\u306a\u3044)<\/p>\n \u3053\u306e\u8a18\u4e8b\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3092\u4f5c\u3063\u3066\u3044\u304f\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\uff0e<\/p>\n <\/a><\/p>\n TeX \u306f\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u3067\u5927\u62b5\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3068\u76f8\u6027\u304c\u826f\u3044\u3067\u3059\uff0e\u4eca\u56de\u306e\u8a18\u4e8b\u3067\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0 (VCS)\u3068\u3057\u3066 Git \u3092\u4f7f\u3044\u307e\u3059\uff0eGit \u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059:<\/p>\n Git \u3092\u5c0e\u5165\u3059\u308b\u30c7\u30e1\u30ea\u30c3\u30c8\u306f\u307b\u307c\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u304c\uff0c\u5171\u8457\u8005\u304c Git \u306e\u64cd\u4f5c\u306b\u6163\u308c\u3066\u3044\u306a\u3044\u5834\u5408\uff0c\u57f7\u7b46\u4e2d\u306b conflict \u306a\u3069\u304c\u767a\u751f\u3057\u4e8b\u6545\u304c\u8d77\u3053\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\uff0e\u305f\u3044\u3066\u3044\u306e\u5834\u5408\u306f\u77e5\u8b58\u304c\u3042\u308b\u4eba\u304c\u64cd\u4f5c\u3059\u308b\u3053\u3068\u3067\u5fa9\u65e7\u3067\u304d\u308b\u306e\u3067\u554f\u984c\u306a\u3044\u3068\u601d\u308f\u308c\u307e\u3059\uff0e<\/p>\n \u5b9f\u9a13\u30c7\u30fc\u30bf\u304c\u5de8\u5927\u306a\u30d0\u30a4\u30ca\u30ea\u306b\u306a\u308b\u3088\u3046\u306a\u7814\u7a76\u3092\u884c\u3063\u3066\u3044\u308b\u5834\u5408\u306f\uff0cGit \u3067\u5b9f\u9a13\u30c7\u30fc\u30bf\u3092\u7ba1\u7406\u3059\u308b\u306e\u306f\u3042\u307e\u308a\u304a\u3059\u3059\u3081\u3067\u304d\u307e\u305b\u3093\uff0e\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306f\uff0c\u5b9f\u9a13\u30c7\u30fc\u30bf\u306b\u306f Git LFS \u3084\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u3046\u306a\u3069\u67d4\u8edf\u306a\u5bfe\u5fdc\u304c\u5fc5\u8981\u3067\u3059\uff0e<\/p>\n Git \u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u7f6e\u304f\u5834\u6240\u3068\u3057\u3066 GitHub \u3092\u5229\u7528\u3057\u307e\u3059\uff0eGitHub \u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n \u30c7\u30e1\u30ea\u30c3\u30c8\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n <\/a><\/p>\n GitHub \u3067\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u5229\u7528\u3059\u308b\u306b\u306f\uff0c\u4e00\u822c\u7684\u306b\u306f\u8ab2\u91d1\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e\u305f\u3060\uff0c\u5b66\u6821\u306e\u6559\u54e1\u30fb\u7814\u7a76\u8005\u30fb\u5b66\u751f\u306e\u500b\u4eba\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3084\uff0c\u7814\u7a76\u5ba4\u7b49\u306e organization \u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u306f\u00a0education.github.com<\/a> \u304b\u3089\u7533\u8acb\u3059\u308b\u3053\u3068\u3067\uff0c\u7121\u6599\u3067\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n \u7533\u8acb\u3059\u308b\u305f\u3081\u306b\u306f .ac.jp \u3067\u7d42\u308f\u308b\u3088\u3046\u306a\u5b66\u6821\u304c\u767a\u884c\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u3042\u308c\u3070 OK \u3067\u3059\uff0eGitHub \u306f\u8907\u6570\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u767b\u9332\u3067\u304d\u308b\u306e\u3067\uff0c\u7533\u8acb\u524d\u306b\u5b66\u6821\u306e\u30a2\u30c9\u30ec\u30b9\u3082\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u767b\u9332\u3057\u3066\u304a\u304f\u3068\u30b9\u30e0\u30fc\u30ba\u306b\u884c\u3048\u307e\u3059\uff0e\u6975\u3081\u3066\u7c21\u5358\u306a\u624b\u9806\u3067\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u306e\u3067\uff0c\u305c\u3072\u5229\u7528\u3057\u307e\u3057\u3087\u3046\uff0e<\/p>\n <\/a><\/p>\n Slack \u306f\u7121\u6599\u3067\u4f7f\u3044\u59cb\u3081\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u3067\u3059\uff0e\u4e3b\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u76ee\u7684\u3067\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059<\/p>\n Slack \u306f GitHub \u3084 CircleCI \u3068\u3044\u3063\u305f\uff0c\u5916\u90e8\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u306e\u9023\u643a\u304c\u7c21\u5358\u306b\u3067\u304d\u308b\u306e\u3067\u304a\u3059\u3059\u3081\u3067\u3059\u304c\uff0c\u4ed6\u306e\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u3066\u3082\u826f\u3044\u3067\u3059\u3057\uff0c\u3082\u3061\u308d\u3093\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u3092\u5c0e\u5165\u305b\u305a\u306b\u30e1\u30fc\u30eb\u3067\u901a\u77e5\u3092\u53d7\u3051\u308b\u5f62\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\uff0e<\/p>\n TeX \u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066 PDF \u30d5\u30a1\u30a4\u30eb\u3092\u51fa\u529b\u3059\u308b\u305f\u3081\u306b\uff0c\u624b\u52d5\u3067\u4f55\u56de\u3082\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u306e\u306f\u7121\u99c4\u304c\u591a\u3044\u3067\u3059\uff0e\u30c4\u30fc\u30eb\u3092\u5c0e\u5165\u3057\u3066\uff0c\u30b3\u30de\u30f3\u30c91\u3064\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3053\u3068\u304c\uff0c\u81ea\u5206\u306b\u3068\u3063\u3066\u3082\u5171\u8457\u8005\u306b\u3068\u3063\u3066\u3082\u91cd\u8981\u3067\u3059\uff0e<\/p>\n Latexmk \u306f\u4e00\u822c\u7684\u306a\u8ad6\u6587\u3092\u66f8\u304f\u969b\u306b\u306f\u6700\u3082\u304a\u3059\u3059\u3081\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3067\u3059\uff0eTeX \u306e\u51e6\u7406\u7cfb\u3092\u8a2d\u5b9a\u6b21\u7b2c\u3067\u4f7f\u3044\u5206\u3051\u3089\u308c\u305f\u308a\uff0c\u5fc5\u8981\u306a\u56de\u6570\u3060\u3051\u304d\u3061\u3093\u3068\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u884c\u3063\u3066\u304f\u308c\u305f\u308a\uff0cBibTeX \u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u305f\u308a\u3057\u3066\uff0c\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\uff0e\u307e\u305f\uff0c\u30d5\u30a1\u30a4\u30eb\u306e\u66f4\u65b0\u3092\u691c\u77e5\u3057\u3066\u81ea\u52d5\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30d7\u30ec\u30d3\u30e5\u30fc\u3059\u308b\u3068\u8a00\u3063\u305f\u3053\u3068\u3082\u7c21\u5358\u306b\u884c\u3048\u307e\u3059\uff0e\u4f7f\u3044\u65b9\u306e\u8a73\u7d30\u306f\u3053\u3061\u3089<\/a>\u3092\u53c2\u7167\u3057\u3066\u4e0b\u3055\u3044\uff0e<\/p>\n \u81ea\u5206\u304c\u8ad6\u6587\u3092\u66f8\u304f\u969b\u306b\u306f\uff0cTeX \u306e\u30bd\u30fc\u30b9\u306e\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u3088\u3046\u306a\u3082\u306e\u3092\u4f7f\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\uff0e\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306f Latexmk \u3092\u76f4\u63a5\u4f7f\u308f\u305a\uff0cMakefile \u3092\u66f8\u3044\u3066\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n \u305d\u306e\u4ed6\u306b\u3082\u597d\u307f\u306e\u30c4\u30fc\u30eb\u304c\u3042\u308c\u3070\u305d\u308c\u3092\u4f7f\u3046\u306e\u304c\u826f\u3044\u3068\u601d\u3044\u307e\u3059\uff0e\u5c11\u306a\u304f\u3068\u3082\u30b3\u30de\u30f3\u30c9\u3092\u4e00\u5ea6\u5b9f\u884c\u3067\u304d\u308b\u3060\u3051\u3067\uff0c\u671b\u3093\u3067\u3044\u308b PDF \u30d5\u30a1\u30a4\u30eb\u304c\u5f97\u3089\u308c\u308b\u3088\u3046\u306a\u74b0\u5883\u306f\u6574\u3048\u3066\u304a\u304f\u3079\u304d\u3067\u3059\uff0e<\/p>\n <\/a><\/p>\n CircleCI \u306f\u4e3b\u306b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u306b\u7528\u3044\u3089\u308c\u308b CI \u30c4\u30fc\u30eb\u3067\u3059\uff0eGitHub \u3068\u7c21\u5358\u306b\u9023\u643a\u3057\u3066\uff0c\u30b3\u30df\u30c3\u30c8\u304c\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u69d8\u3005\u306a\u30bf\u30b9\u30af (\u3053\u3053\u3067\u306f TeX \u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u306a\u3069) \u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff0eCircleCI \u306b\u306f\u6b21\u306e\u3088\u3046\u306a\u7279\u5fb4\u304c\u3042\u308a\u307e\u3059:<\/p>\n CircleCI \u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306f\u3053\u3061\u3089<\/a>\u3092\uff0cSlack \u306a\u3069\u306e\u30c1\u30e3\u30c3\u30c8\u30c4\u30fc\u30eb\u306b\u7d50\u679c\u3092\u901a\u77e5\u3059\u308b\u65b9\u6cd5\u306f\u3053\u3061\u3089<\/a>\u3092\u53c2\u7167\u3057\u3066\u4e0b\u3055\u3044\uff0e<\/p>\n CircleCI \u306e\u8a2d\u5b9a\u306f \u30d9\u30fc\u30b9\u3068\u306a\u308b Docker \u30a4\u30e1\u30fc\u30b8\u306b\u306f Ubuntu 17.10 \u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u304c\uff0c\u3053\u306e\u3042\u305f\u308a\u306f\u304a\u597d\u307f\u3067\u8a2d\u5b9a\u3057\u3066\u4e0b\u3055\u3044\uff0e\u81ea\u5206\u306e\u5834\u5408\u306f\u65b0\u3057\u3081\u306e TeX Live \u3092\u5229\u7528\u3057\u305f\u3044\u305f\u3081\u3053\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u306b\u3057\u3066\u3044\u307e\u3059\uff0e\u307e\u305f\uff0cTeX Live \u306f\u3044\u304f\u3064\u3082\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u5206\u304b\u308c\u3066\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u305f\u3081\uff0c\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u9069\u5b9c apt \u3067\u5c0e\u5165\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u4e0b\u3055\u3044\uff0e<\/p>\n \u6bce\u56de CircleCI \u3067 Docker \u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u3066\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u4f8b:<\/p>\n \u3053\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u4f7f\u3046\u305f\u3081\u306e\uff0cCircleCI \u306e\u8a2d\u5b9a\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059:<\/p>\n \u82f1\u8a9e\u3067\u8ad6\u6587\u3092\u66f8\u3044\u3066\u3044\u308b\u5834\u5408\u306f\uff0c\u81ea\u52d5\u3067\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3063\u3066\u304f\u308c\u308b\u3068\u4fbf\u5229\u3067\u3059\uff0e\u3053\u306e\u8a18\u4e8b\u3067\u306f aspell \u3068\u3044\u3046\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30ab\u30fc\u3092\u5229\u7528\u3057\u307e\u3059\uff0e<\/p>\n macOS \u3067\u306f \u8ad6\u6587\u306e\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u3068\u5c02\u9580\u7528\u8a9e\u7b49\u304c\u5f3e\u304b\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\uff0e\u3053\u306e\u305f\u3081\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u8f9e\u66f8\u3092\u6e96\u5099\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e\u666e\u901a\u306f\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u8f9e\u66f8\u304c\u4fdd\u5b58\u3055\u308c\u307e\u3059\u304c\uff0c\u3053\u308c\u3067\u306f\u4ed6\u306e\u8457\u8005\u3084 CI \u4e0a\u3067\u3053\u306e\u8f9e\u66f8\u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\uff0e \u307e\u305a\uff0c1\u3064\u76ee\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306b\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3063\u3066\uff0c\u8db3\u308a\u306a\u3044\u5358\u8a9e\u3092\u8f9e\u66f8\u306b\u8ffd\u52a0\u3057\u3066\uff0c\u305d\u306e\u5f8c2\u3064\u76ee\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u691c\u8a3c\u3059\u308b\u306e\u304c\u826f\u3044\u3067\u3057\u3087\u3046\uff0e<\/p>\n aspell \u306f\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5f15\u6570\u306b\u53d6\u3063\u3066\u304f\u308c\u306a\u3044\u3088\u3046\u306a\u306e\u3067\uff0c\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u3057\u3066\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u306b\u306f\u3061\u3087\u3063\u3068\u3057\u305f\u5de5\u592b\u304c\u5fc5\u8981\u3067\u3059\uff0e<\/p>\n \u57fa\u672c\u7684\u306b\u306f\u4e0a\u306b\u4e0a\u3052\u305f\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3044\u307e\u3059\uff0e\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u306b\u5931\u6557\u3057\u305f\u5834\u5408\u306f exit code \u3092 0 \u4ee5\u5916\u306e\u5024\u306b\u3057\u3066\u6b32\u3057\u3044\u306e\u3067\u3059\u304c\uff0caspell \u306f\u30a8\u30e9\u30fc\u304c\u3042\u3063\u305f\u5834\u5408\u3082 exit code \u304c 0 \u306b\u306a\u308b\u3088\u3046\u306a\u306e\u3067\u5c11\u3057\u4e0d\u4fbf\u3067\u3059\uff0e\u3053\u306e\u305f\u3081\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u6e96\u5099\u3057\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\uff0e<\/p>\n \u3053\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306f\uff0c\u30b9\u30da\u30eb\u30a8\u30e9\u30fc\u304c1\u3064\u3082\u306a\u3044\u3068\u304d\u306e\u307f exit code \u304c 0 \u306b\u306a\u308a\uff0c\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u306f 1 \u306b\u306a\u308a\u307e\u3059\uff0e\u307e\u305f\uff0c\u30b9\u30da\u30eb\u30a8\u30e9\u30fc\u304c\u691c\u51fa\u3055\u308c\u305f\u5358\u8a9e\u306e\u4e00\u89a7\u3084\uff0c\u305d\u306e\u30b9\u30da\u30eb\u30a8\u30e9\u30fc\u304c\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u5b58\u5728\u3059\u308b\u304b\u3082 (git grep \u3067) \u8abf\u3079\u3066\u304f\u308c\u307e\u3059\uff0e\u3053\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u3046 CircleCI \u306e\u8a2d\u5b9a\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n \u3053\u308c\u3067\uff0c\u8ad6\u6587\u3092\u66f8\u3044\u3066 GitHub \u306b push \u3059\u308b\u3060\u3051\u3067\uff0c\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u51fa\u6765\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\uff0c\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3044\uff0c\u7d50\u679c\u3092\u30c1\u30e3\u30c3\u30c8\u30c4\u30fc\u30eb\u306b\u901a\u77e5\u3059\u308b\u4ed5\u7d44\u307f\u304c\u6574\u3044\u307e\u3057\u305f!<\/p>\n <\/a><\/p>\n \u305b\u3063\u304b\u304f CircleCI \u3067 PDF \u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u306e\u3067\uff0c\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7c21\u5358\u306b\u95b2\u89a7\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u3088\u308a\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e\u4eca\u56de\u306f Amazon S3 \u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3059\uff0e<\/p>\n PDF \u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304f\u305f\u3081\u306e\u30d0\u30b1\u30c3\u30c8\u3092 S3 \u306b\u4f5c\u6210\u3057\u307e\u3059\uff0eWeb \u304b\u3089\u4f5c\u6210\u3059\u308b\u5834\u5408\u306f\u3053\u3061\u3089<\/a>\u304b\u3089\u4f5c\u696d\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n CircleCI \u306e\u3053\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089 AWS \u3092\u4f7f\u3046\u305f\u3081\u306e IAM \u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\uff0e\u4eca\u56de\u306f\uff0c\u3053\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30d0\u30b1\u30c3\u30c8\u3078\u306e \u4f5c\u6210\u3057\u305f IAM \u30e6\u30fc\u30b6\u30fc\u306e\u8a8d\u8a3c\u60c5\u5831\u306f\u3053\u3061\u3089\u306e\u624b\u9806<\/a>\u306b\u5f93\u3063\u3066 CircleCI \u306b\u767b\u9332\u3057\u307e\u3059\uff0e<\/p>\n CircleCI \u304b\u3089 Amazon S3 \u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u4f8b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059:<\/p>\n\u5bfe\u8c61\u8aad\u8005<\/h2>\n
\u76ee\u6a19<\/h2>\n
\n
Git<\/h2>\n
\n
GitHub<\/h2>\n
\n
\n
\n
\n
\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u7121\u6599\u3067\u5229\u7528\u3059\u308b<\/h3>\n
Slack<\/h2>\n
\n
\n
\n
TeX \u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30f3\u30d1\u30a4\u30eb<\/h2>\n
Latexmk<\/h3>\n
Make<\/h3>\n
\u305d\u306e\u4ed6<\/h3>\n
CircleCI<\/h2>\n
\n
\u57fa\u672c\u306e\u8a2d\u5b9a<\/h3>\n
.circleci\/config.yml<\/code> \u306b YAML \u5f62\u5f0f\u3067\u8a18\u8ff0\u3057\u307e\u3059\uff0e
paper<\/code> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306b\u3042\u308bTeX \u30bd\u30fc\u30b9\u3092
latexmk<\/code> \u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3060\u3051\u306e\u6700\u3082\u57fa\u672c\u7684\u306a\u8a2d\u5b9a\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n
version: 2\r\njobs:\r\n build:\r\n docker:\r\n - image: ubuntu:17.10\r\n steps:\r\n - checkout\r\n - run:\r\n command: |\r\n apt update\r\n apt install -y latexmk make texlive texlive-latex-extra\r\n - run:\r\n command: latexmk\r\n working_directory: paper<\/code><\/pre>\n
\u5fdc\u7528: Docker \u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u3063\u3066\u9ad8\u901f\u5316<\/h3>\n
apt install<\/code> \u3092\u884c\u3046\u3068\u6642\u9593\u304c\u304b\u304b\u3063\u3066\u3057\u307e\u3044\u307e\u3059\uff0e\u3053\u306e\u6642\u9593\u304c\u6c17\u306b\u306a\u308b\u5834\u5408\u306f\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306a
Dockerfile<\/code> \u3092\u4f5c\u6210\u3057\uff0c\u4e8b\u524d\u306b Docker \u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u3066\uff0cDocker Hub \u306b\u30a4\u30e1\u30fc\u30b8\u3092\u7f6e\u3044\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\uff0e<\/p>\n
FROM ubuntu:17.10\r\n\r\nRUN apt update && \\\r\n apt install --no-install-recommends -y \\\r\n latexmk lmodern make texlive texlive-latex-extra<\/code><\/pre>\n
$ docker build -t ymyzk\/sgtp:latest .\r\n$ docker push ymyzk\/sgtp:latest<\/code><\/pre>\n
version: 2\r\njobs:\r\n build:\r\n docker:\r\n - image: ymyzk\/sgtp:latest\r\n steps:\r\n - checkout\r\n - run:\r\n command: |\r\n apt update\r\n apt install -y latexmk make texlive texlive-latex-extra\r\n - run:\r\n command: latexmk\r\n working_directory: paper<\/code><\/pre>\n
\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af<\/h2>\n
\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n
brew install aspell<\/code>\uff0cLinux (Debian\u7cfb) \u3067\u306f
apt install aspell aspell-en<\/code> \u306a\u3069\u3067\u7c21\u5358\u306b\u5c0e\u5165\u3067\u304d\u307e\u3059\uff0e<\/p>\n
\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h3>\n
# \u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306b\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\r\n$ aspell --lang=en --mode=tex check paper.tex\r\n\r\n# \u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3063\u3066\uff0c\u30b9\u30da\u30eb\u304c\u8aa4\u3063\u3066\u3044\u308b\u5358\u8a9e\u306e\u30ea\u30b9\u30c8\u3092\u51fa\u529b\u3059\u308b\r\n$ cat paper.tex | aspell --lang=en --mode=tex list | sort | uniq<\/code><\/pre>\n
\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u8f9e\u66f8\u3092\u6e96\u5099\u3059\u308b<\/h3>\n
--personal<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066 Git \u30ea\u30dd\u30b8\u30c8\u30ea\u5185\u306e
aspell\/aspell.en.pws<\/code> \u306b\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u8f9e\u66f8\u3092\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u306e\u304c\u4ee5\u4e0b\u306e\u4f8b\u3067\u3059\uff0e<\/p>\n
# \u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306b\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\r\n$ aspell --lang=en --mode=tex --personal=aspell\/aspell.en.pws check paper.tex\r\n\r\n# \u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3063\u3066\uff0c\u30b9\u30da\u30eb\u304c\u8aa4\u3063\u3066\u3044\u308b\u5358\u8a9e\u306e\u30ea\u30b9\u30c8\u3092\u51fa\u529b\u3059\u308b\r\n$ cat paper.tex | aspell --lang=en --mode=tex --personal=aspell\/aspell.en.pws list | sort | uniq<\/code><\/pre>\n
\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3059\u308b<\/h3>\n
# \u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306b\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\r\n$ for f in sections\/*.tex; do\r\n aspell --lang=en --mode=tex --personal=aspell\/aspell.en.pws check paper.tex\r\n done\r\n\r\n# \u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3063\u3066\uff0c\u30b9\u30da\u30eb\u304c\u8aa4\u3063\u3066\u3044\u308b\u5358\u8a9e\u306e\u30ea\u30b9\u30c8\u3092\u51fa\u529b\u3059\u308b\r\n$ cat sections\/*.tex | aspell --lang=en --mode=tex --personal=aspell\/aspell.en.pws list | sort | uniq<\/code><\/pre>\n
CI \u3067\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u3092\u5b9f\u884c\u3059\u308b<\/h3>\n
#!\/bin\/bash\r\nset -e\r\n\r\nfiles=\"paper\/paper.tex paper\/sections\/*.tex\"\r\nwords=$(cat $files | aspell --lang=en --mode=tex --personal=aspell\/aspell.en.pws list | sort | uniq)\r\n\r\necho \"Processed files: $files\"\r\necho\r\n\r\nif [[ -z $words ]]; then\r\n echo \"Succeeded!\"\r\n exit 0\r\nfi\r\n\r\necho \"Misspelled words:\"\r\nfor word in $words; do\r\n echo \"- $word\"\r\ndone\r\necho\r\n\r\necho \"Result of git-grep:\"\r\nfor word in $words; do\r\n git grep -n $word\r\ndone\r\necho\r\n\r\necho \"Failed...\"\r\n\r\nexit 1<\/code><\/pre>\n
version: 2\r\njobs:\r\n build:\r\n docker:\r\n - image: ubuntu:17.10\r\n environment:\r\n TERM: xterm\r\n steps:\r\n - run:\r\n command: |\r\n apt update\r\n apt install -y aspell aspell-en git latexmk make texlive texlive-latex-extra\r\n - checkout\r\n - run:\r\n command: latexmk\r\n working_directory: paper\r\n - run:\r\n command: .\/run_aspell.sh<\/code><\/pre>\n
Amazon S3<\/h2>\n
\u30d0\u30b1\u30c3\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n
IAM \u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n
s3:PutObject<\/code> \u3068
s3:ListBucket<\/code> \u306e\u6a29\u9650\u306e\u307f\u3092\u4ed8\u4e0e\u3057\u307e\u3057\u305f:<\/p>\n
{\r\n \"Version\": \"2012-10-17\",\r\n \"Statement\": [\r\n {\r\n \"Sid\": \"VisualEditor0\",\r\n \"Effect\": \"Allow\",\r\n \"Action\": \"s3:PutObject\",\r\n \"Resource\": \"arn:aws:s3:::my-paper\/*\"\r\n },\r\n {\r\n \"Sid\": \"VisualEditor1\",\r\n \"Effect\": \"Allow\",\r\n \"Action\": \"s3:ListBucket\",\r\n \"Resource\": \"arn:aws:s3:::my-paper\"\r\n }\r\n ]\r\n}<\/code><\/pre>\n
CircleCI \u304b\u3089 Amazon S3 \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b<\/h3>\n
version: 2\r\njobs:\r\n build:\r\n docker:\r\n - image: ubuntu:17.10\r\n environment:\r\n TERM: xterm\r\n steps:\r\n - run:\r\n command: |\r\n apt update\r\n apt install -y aspell aspell-en ca-certificates git latexmk make texlive texlive-latex-extra\r\n - checkout\r\n - run:\r\n command: latexmk\r\n working_directory: paper\r\n - run:\r\n command: .\/run_aspell.sh\r\n - run:\r\n command: |\r\n mkdir -p \/tmp\/workspace\r\n cp .\/paper.pdf \/tmp\/workspace\/paper.pdf\r\n working_directory: paper\r\n - persist_to_workspace:\r\n root: \/tmp\/workspace\r\n paths:\r\n - paper.pdf\r\n\r\n deploy-s3:\r\n docker:\r\n - image: python:3.6-stretch\r\n\r\n steps:\r\n - checkout\r\n - attach_workspace:\r\n at: \/tmp\/workspace\r\n - restore_cache:\r\n key: config-{{ checksum \".circleci\/config.yml\" }}\r\n - run:\r\n command: |\r\n python3 -m venv venv\r\n . venv\/bin\/activate\r\n pip install -U awscli\r\n - save_cache:\r\n key: config-{{ checksum \".circleci\/config.yml\" }}\r\n paths:\r\n - venv\r\n - run:\r\n command: |\r\n now=$(TZ=Asia\/Tokyo git show -s --date=iso-local --format=%ad $CIRCLE_SHA1 | tr -d '\\n')\r\n short_sha1=$(git rev-parse --short $CIRCLE_SHA1)\r\n echo \"Author Date: $now\"\r\n echo \"Short Hash: $short_sha1\"\r\n cd \/tmp\/workspace\r\n for f in *; do mv \"$f\" \"$now $short_sha1 $f\"; done\r\n - run:\r\n command: |\r\n . venv\/bin\/activate\r\n aws s3 sync \/tmp\/workspace\/ s3:\/\/my-paper\/\r\n\r\nworkflows:\r\n version: 2\r\n build:\r\n jobs:\r\n - build\r\n - deploy-s3:\r\n requires:\r\n - build<\/code><\/pre>\n