{"action":"created","issue":{"url":"https://api.github.com/repos/rubycorns/rorganize.it/issues/574","repository_url":"https://api.github.com/repos/rubycorns/rorganize.it","labels_url":"https://api.github.com/repos/rubycorns/rorganize.it/issues/574/labels{/name}","comments_url":"https://api.github.com/repos/rubycorns/rorganize.it/issues/574/comments","events_url":"https://api.github.com/repos/rubycorns/rorganize.it/issues/574/events","html_url":"https://github.com/rubycorns/rorganize.it/issues/574","id":273925065,"number":574,"title":"Deploy automatically via Travis?","user":{"login":"til","id":11211,"avatar_url":"https://avatars3.githubusercontent.com/u/11211?v=4","gravatar_id":"","url":"https://api.github.com/users/til","html_url":"https://github.com/til","followers_url":"https://api.github.com/users/til/followers","following_url":"https://api.github.com/users/til/following{/other_user}","gists_url":"https://api.github.com/users/til/gists{/gist_id}","starred_url":"https://api.github.com/users/til/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/til/subscriptions","organizations_url":"https://api.github.com/users/til/orgs","repos_url":"https://api.github.com/users/til/repos","events_url":"https://api.github.com/users/til/events{/privacy}","received_events_url":"https://api.github.com/users/til/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-14T20:05:30Z","updated_at":"2017-11-14T20:25:48Z","closed_at":null,"author_association":"OWNER","body":"Wouldn't it be nice if after a successful pass of the master branch on Travis, the new code would automatically be deployed to https://rorganize.it/ ?\r\n\r\nOne approach to set this up while continuing to use most of our current deployment configuration would be to:\r\n\r\n1) allow Travis to ssh into our uberspace account\r\n2) configure travis to do that\r\n\r\nStep 1) works by retrieving the pubkey for our repository:\r\n```\r\n$ travis pubkey\r\nDetected repository as rubycorns/rorganize.it, is this correct? |yes| yes\r\nPublic key for rubycorns/rorganize.it:\r\n\r\nssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCe/0eZu1ki+CuInhNx9xjbtD9bMS8L39TnZR4kJxtdZh8fe5X4+Hknwwp5aEYSoOmGt41ZLIOaTEGR8MmvddN+ixgLwJKcd5NUMb+vvjMsjeCTypPjgf6ShRt4ryEw6Iy1ZE2671sg6VPIcrT+CpP4Uh2AauZE8qVdksdIZ9hgvQ==\r\n```\r\n\r\nand adding that to `.ssh/authorized_keys` on Uberspace.\r\n\r\nStep 2) means adding this snippet to .travis.yml:\r\n```yaml\r\ndeploy:\r\n  provider: script\r\n  script: deploy/travis.sh\r\n  skip_cleanup: true\r\n  on:\r\n    branch: master\r\n```\r\nand a `deploy/travis.sh`:\r\n\r\n```sh\r\n#!/bin/bash\r\n#\r\n# This script is meant to run on Travis. It deploys via git push to\r\n# the target server.\r\nset -e\r\n\r\ncat << EOF >> ~/.ssh/config\r\nHost relaunch-deka-etf.klug-newmedia.de\r\nStrictHostKeyChecking no\r\nEOF\r\n\r\ngit remote add production ror@rorganize.it:rorganize.it\r\ngit push -f production production\r\n```\r\n\r\nNot sure if this is everything. Anybody wants to try that?"},"comment":{"url":"https://api.github.com/repos/rubycorns/rorganize.it/issues/comments/344386963","html_url":"https://github.com/rubycorns/rorganize.it/issues/574#issuecomment-344386963","issue_url":"https://api.github.com/repos/rubycorns/rorganize.it/issues/574","id":344386963,"user":{"login":"lislis","id":1006478,"avatar_url":"https://avatars2.githubusercontent.com/u/1006478?v=4","gravatar_id":"","url":"https://api.github.com/users/lislis","html_url":"https://github.com/lislis","followers_url":"https://api.github.com/users/lislis/followers","following_url":"https://api.github.com/users/lislis/following{/other_user}","gists_url":"https://api.github.com/users/lislis/gists{/gist_id}","starred_url":"https://api.github.com/users/lislis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lislis/subscriptions","organizations_url":"https://api.github.com/users/lislis/orgs","repos_url":"https://api.github.com/users/lislis/repos","events_url":"https://api.github.com/users/lislis/events{/privacy}","received_events_url":"https://api.github.com/users/lislis/received_events","type":"User","site_admin":false},"created_at":"2017-11-14T20:25:48Z","updated_at":"2017-11-14T20:25:48Z","author_association":"OWNER","body":"ok, ssh key added named it `travis/pubkey`"}}
{"actor":{"display_login":"lislis"}}