{"action":"created","issue":{"url":"https://api.github.com/repos/willzeng/cograph/issues/642","labels_url":"https://api.github.com/repos/willzeng/cograph/issues/642/labels{/name}","comments_url":"https://api.github.com/repos/willzeng/cograph/issues/642/comments","events_url":"https://api.github.com/repos/willzeng/cograph/issues/642/events","html_url":"https://github.com/willzeng/cograph/pull/642","id":77880894,"number":642,"title":"Deploy to Heroku from Circle CI upon updates to a given branch","user":{"login":"harlantwood","id":38769,"avatar_url":"https://avatars.githubusercontent.com/u/38769?v=3","gravatar_id":"","url":"https://api.github.com/users/harlantwood","html_url":"https://github.com/harlantwood","followers_url":"https://api.github.com/users/harlantwood/followers","following_url":"https://api.github.com/users/harlantwood/following{/other_user}","gists_url":"https://api.github.com/users/harlantwood/gists{/gist_id}","starred_url":"https://api.github.com/users/harlantwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harlantwood/subscriptions","organizations_url":"https://api.github.com/users/harlantwood/orgs","repos_url":"https://api.github.com/users/harlantwood/repos","events_url":"https://api.github.com/users/harlantwood/events{/privacy}","received_events_url":"https://api.github.com/users/harlantwood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-19T01:20:26Z","updated_at":"2015-05-19T01:34:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/willzeng/cograph/pulls/642","html_url":"https://github.com/willzeng/cograph/pull/642","diff_url":"https://github.com/willzeng/cograph/pull/642.diff","patch_url":"https://github.com/willzeng/cograph/pull/642.patch"},"body":"This PR pushes off the app compilation to a CI server, in this case Circle CI (free for open source projects).  When you push to a branch of your choice, your code will be deployed to your heroku app.  Later, when we add tests to CI, it will only deploy if tests pass.\r\n\r\nTo use:\r\n- Specify a branch in [circle.yml](https://github.com/willzeng/cograph/compare/dev...harlantwood:deploy3#diff-29944324a3cbf9f4bd0162dfe3975d88R3) to be built and deployed on every update (eg `production` or `deploy`)\r\n- Visit your Circle settings page, something like: https://circleci.com/gh/[YOUR GITHUB USER]/cograph/edit -- click \"Follow\" and visit \"Heroku Deployment\" on the left menu and follow instructions there\r\n- [Add an environment variable](https://circleci.com/gh/harlantwood/cograph/edit#env-vars) to Circle CI:  `HEROKU_APP`, with the value of your Heroku app name to deploy to\r\n\r\nNow when you push to your branch, CI will:\r\n- run `bin/compile`, precompiling assets, \r\n- commit these assets to git\r\n- force push this commit to Heroku\r\n\r\nNote that this commit of compiled assets only exists on CI and on Heroku, not on a dev machine, and not on github.  This keeps git history free of the noise of generated commits.  \r\n\r\nAs an example, here is Circle CI [running this code, and deploying any changes to the `production` branch to my test cograph heroku instance](https://circleci.com/gh/harlantwood/cograph/9):  -- expand the `bin/deploy` section to see the compilation and deploy to heroku.\r\n\r\nNote that this PR obviates #639.\r\n"},"comment":{"url":"https://api.github.com/repos/willzeng/cograph/issues/comments/103294173","html_url":"https://github.com/willzeng/cograph/pull/642#issuecomment-103294173","issue_url":"https://api.github.com/repos/willzeng/cograph/issues/642","id":103294173,"user":{"login":"harlantwood","id":38769,"avatar_url":"https://avatars.githubusercontent.com/u/38769?v=3","gravatar_id":"","url":"https://api.github.com/users/harlantwood","html_url":"https://github.com/harlantwood","followers_url":"https://api.github.com/users/harlantwood/followers","following_url":"https://api.github.com/users/harlantwood/following{/other_user}","gists_url":"https://api.github.com/users/harlantwood/gists{/gist_id}","starred_url":"https://api.github.com/users/harlantwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harlantwood/subscriptions","organizations_url":"https://api.github.com/users/harlantwood/orgs","repos_url":"https://api.github.com/users/harlantwood/repos","events_url":"https://api.github.com/users/harlantwood/events{/privacy}","received_events_url":"https://api.github.com/users/harlantwood/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T01:34:06Z","updated_at":"2015-05-19T01:34:06Z","body":"BTW, although I _believe_ the deploy to heroku is working just fine, there are issues with the app there, possibly due to missing config variables.  Currently:\r\n\r\n```\r\n2015-05-19T00:34:16.728061+00:00 app[web.1]: > graphdocs@0.0.0 start /app\r\n2015-05-19T00:34:16.728064+00:00 app[web.1]: > node bin/www\r\n2015-05-19T00:34:16.728065+00:00 app[web.1]: \r\n2015-05-19T00:34:19.551919+00:00 app[web.1]: npm ERR! Linux 3.13.0-49-generic\r\n2015-05-19T00:34:19.558631+00:00 app[web.1]: npm ERR!     node bin/www\r\n2015-05-19T00:34:19.558948+00:00 app[web.1]: npm ERR! You can get their info via:\r\n2015-05-19T00:34:19.559222+00:00 app[web.1]: npm ERR!     npm owner ls graphdocs\r\n2015-05-19T00:34:19.580270+00:00 app[web.1]: npm ERR! There is likely additional logging output above.\r\n2015-05-19T00:34:19.597842+00:00 app[web.1]: npm ERR! Please include the following file with any support request:\r\n2015-05-19T00:34:19.597980+00:00 app[web.1]: npm ERR!     /app/npm-debug.log\r\n2015-05-19T00:34:19.511899+00:00 app[web.1]: /app/node_modules/express.io/node_modules/express/node_modules/connect/lib/proto.js:103\r\n2015-05-19T00:34:19.511906+00:00 app[web.1]:     , search = 1 + req.url.indexOf('?')\r\n2015-05-19T00:34:19.511909+00:00 app[web.1]:                           ^\r\n2015-05-19T00:34:19.511911+00:00 app[web.1]: TypeError: Cannot read property 'indexOf' of undefined\r\n2015-05-19T00:34:19.511913+00:00 app[web.1]:     at Function.app.handle (/app/node_modules/express.io/node_modules/express/node_modules/connect/lib/proto.js:103:27)\r\n2015-05-19T00:34:19.511915+00:00 app[web.1]:     at app (/app/node_modules/express.io/node_modules/express/node_modules/connect/lib/connect.js:65:37)\r\n2015-05-19T00:34:19.511916+00:00 app[web.1]:     at Object.<anonymous> (/app/app.coffee:66:19)\r\n2015-05-19T00:34:19.511918+00:00 app[web.1]:     at Object.<anonymous> (/app/app.coffee:97:4)\r\n2015-05-19T00:34:19.511920+00:00 app[web.1]:     at Module._compile (module.js:460:26)\r\n2015-05-19T00:34:19.511921+00:00 app[web.1]:     at Object.loadFile (/app/node_modules/coffee-script/lib/coffee-script/coffee-script.js:23:19)\r\n2015-05-19T00:34:19.511923+00:00 app[web.1]:     at Module.load (module.js:355:32)\r\n2015-05-19T00:34:19.511925+00:00 app[web.1]:     at Function.Module._load (module.js:310:12)\r\n2015-05-19T00:34:19.511926+00:00 app[web.1]:     at Module.require (module.js:365:17)\r\n2015-05-19T00:34:19.511928+00:00 app[web.1]:     at require (module.js:384:17)\r\n2015-05-19T00:34:19.545613+00:00 app[web.1]: \r\n```\r\n\r\n@willzeng (or others) can you post a list of the `heroku config` variable names?  I don't need their values, (eg DB credentials), just to know what should be configured.\r\n\r\n"}}