{"action":"opened","number":59,"pull_request":{"url":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls/59","id":29912593,"html_url":"https://github.com/jacobwilliams/json-fortran/pull/59","diff_url":"https://github.com/jacobwilliams/json-fortran/pull/59.diff","patch_url":"https://github.com/jacobwilliams/json-fortran/pull/59.patch","issue_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/59","number":59,"state":"open","locked":false,"title":"Auto deploy script","user":{"login":"zbeekman","id":279612,"avatar_url":"https://avatars.githubusercontent.com/u/279612?v=3","gravatar_id":"","url":"https://api.github.com/users/zbeekman","html_url":"https://github.com/zbeekman","followers_url":"https://api.github.com/users/zbeekman/followers","following_url":"https://api.github.com/users/zbeekman/following{/other_user}","gists_url":"https://api.github.com/users/zbeekman/gists{/gist_id}","starred_url":"https://api.github.com/users/zbeekman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbeekman/subscriptions","organizations_url":"https://api.github.com/users/zbeekman/orgs","repos_url":"https://api.github.com/users/zbeekman/repos","events_url":"https://api.github.com/users/zbeekman/events{/privacy}","received_events_url":"https://api.github.com/users/zbeekman/received_events","type":"User","site_admin":false},"body":"This adds some functionality discussed in #42.\r\n\r\nBefore you, @jacobwilliams, can use this, you need to add a secure environment variable to your travis-ci settings for json-fortran that contains a GitHub token with push access to json-fortran. The environment variable containing the token must be called `GH_TOKEN`. \r\n 1. To make a new token, on GitHub.com click the settings icon in the upper right corner —> Applications —> Generate New Token. (It only needs the public_repo access enabled.) Generate the new token then copy the token to your clipboard so you can paste it into travis-ci settings.\r\n 1. On travis-ci.org click on the upper right hand Settings button for the repository: Settings —> Settings —> Environment Variables —> Add New Variable and call it `GH_TOKEN`, paste in the token value and add it. **DO NOT** change the toggle on the right hand side to on, if you do so you will expose your token to the world, giving anyone who finds it push access to your public GitHub repositories.\r\n\r\nHere are some screen shots to help explain:\r\n\r\nMake the token on GH:\r\n![Making the GH token](https://cloud.githubusercontent.com/assets/279612/6353257/45ad2110-bc16-11e4-90fe-5848456fcf9f.png)\r\n\r\nAdding the secure `GH_TOKEN` on travis-ci.org:\r\n![Adding secure travis-ci token to environment](https://cloud.githubusercontent.com/assets/279612/6353332/b3533916-bc16-11e4-87a2-8adda82fab0d.png)\r\n\r\nThe `deploy.sh` script will do 1 of 3 things:\r\n 1. If run manually, it assumes that there will be write access to jacobwilliams/json-fortran, (i.e., that you are @jacobwilliams) and will deploy the documentation for the current branch, if the documentation has been built under the folder `<branch_name>`. If this is `master` or if `<branch_name>` has previously been added to `index.html` it will completely publish the documentation, including the push to gh-pages. If `<branch_name>` is not linked to from `index.html` it will print a message suggesting that it be added, and stop short of the push, to allow manual intervention.\r\n 1. If the master branch is pushed out to GitHub, and travis-ci builds documentation, the new documentation will be deployed to the `master` folder of the `gh-pages` branch. `index.html` doesn’t need any updating since it already contains a link to this.\r\n 1. If a new tag is pushed out to GitHub, and travis-ci builds documentation for it, it will create or replace a directory with the name of the tag, and ensure that index.html is updated to contain a link to the new tag.\r\n\r\nThe `deploy.sh` script will **NOT**:\r\n 1. publish changes when testing pull requests, only commits to jacobwilliams/json-fortran will cause deployments to jacobwilliams/json-fortran\r\n 1. be able to publish changes to jacobwilliams/json-fortran/gh-pages from other people pushing changes in their own forks. Instead, it will attempt to publish to **THEIR** gh-pages branch of their forks. (But unless they update the `README.md` etc. those links will still point to https://jacobwilliams.github.io/json-fortran)\r\n\r\nI’ve spent a lot of time checking my work, so I really hope this is useful, and that I’m as clever as I think I am. If you take a look at https://zbeekman.github.io/json-fortran you can see some of my testing with tags and master. If you accept this PR, I’m going to wipe out my gh-pages branch and then repopulate it with the upstream (@jacobwilliams’) branch. Let me know if you run into any issues.","created_at":"2015-02-24T16:32:21Z","updated_at":"2015-02-24T16:32:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls/59/commits","review_comments_url":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls/59/comments","review_comment_url":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/59/comments","statuses_url":"https://api.github.com/repos/jacobwilliams/json-fortran/statuses/3caa2272d9c8b0973faefec67b3464076524770b","head":{"label":"zbeekman:auto-deploy","ref":"auto-deploy","sha":"3caa2272d9c8b0973faefec67b3464076524770b","user":{"login":"zbeekman","id":279612,"avatar_url":"https://avatars.githubusercontent.com/u/279612?v=3","gravatar_id":"","url":"https://api.github.com/users/zbeekman","html_url":"https://github.com/zbeekman","followers_url":"https://api.github.com/users/zbeekman/followers","following_url":"https://api.github.com/users/zbeekman/following{/other_user}","gists_url":"https://api.github.com/users/zbeekman/gists{/gist_id}","starred_url":"https://api.github.com/users/zbeekman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbeekman/subscriptions","organizations_url":"https://api.github.com/users/zbeekman/orgs","repos_url":"https://api.github.com/users/zbeekman/repos","events_url":"https://api.github.com/users/zbeekman/events{/privacy}","received_events_url":"https://api.github.com/users/zbeekman/received_events","type":"User","site_admin":false},"repo":{"id":18946788,"name":"json-fortran","full_name":"zbeekman/json-fortran","owner":{"login":"zbeekman","id":279612,"avatar_url":"https://avatars.githubusercontent.com/u/279612?v=3","gravatar_id":"","url":"https://api.github.com/users/zbeekman","html_url":"https://github.com/zbeekman","followers_url":"https://api.github.com/users/zbeekman/followers","following_url":"https://api.github.com/users/zbeekman/following{/other_user}","gists_url":"https://api.github.com/users/zbeekman/gists{/gist_id}","starred_url":"https://api.github.com/users/zbeekman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbeekman/subscriptions","organizations_url":"https://api.github.com/users/zbeekman/orgs","repos_url":"https://api.github.com/users/zbeekman/repos","events_url":"https://api.github.com/users/zbeekman/events{/privacy}","received_events_url":"https://api.github.com/users/zbeekman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zbeekman/json-fortran","description":"A Fortran 2003/2008 JSON API","fork":true,"url":"https://api.github.com/repos/zbeekman/json-fortran","forks_url":"https://api.github.com/repos/zbeekman/json-fortran/forks","keys_url":"https://api.github.com/repos/zbeekman/json-fortran/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zbeekman/json-fortran/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zbeekman/json-fortran/teams","hooks_url":"https://api.github.com/repos/zbeekman/json-fortran/hooks","issue_events_url":"https://api.github.com/repos/zbeekman/json-fortran/issues/events{/number}","events_url":"https://api.github.com/repos/zbeekman/json-fortran/events","assignees_url":"https://api.github.com/repos/zbeekman/json-fortran/assignees{/user}","branches_url":"https://api.github.com/repos/zbeekman/json-fortran/branches{/branch}","tags_url":"https://api.github.com/repos/zbeekman/json-fortran/tags","blobs_url":"https://api.github.com/repos/zbeekman/json-fortran/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zbeekman/json-fortran/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zbeekman/json-fortran/git/refs{/sha}","trees_url":"https://api.github.com/repos/zbeekman/json-fortran/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zbeekman/json-fortran/statuses/{sha}","languages_url":"https://api.github.com/repos/zbeekman/json-fortran/languages","stargazers_url":"https://api.github.com/repos/zbeekman/json-fortran/stargazers","contributors_url":"https://api.github.com/repos/zbeekman/json-fortran/contributors","subscribers_url":"https://api.github.com/repos/zbeekman/json-fortran/subscribers","subscription_url":"https://api.github.com/repos/zbeekman/json-fortran/subscription","commits_url":"https://api.github.com/repos/zbeekman/json-fortran/commits{/sha}","git_commits_url":"https://api.github.com/repos/zbeekman/json-fortran/git/commits{/sha}","comments_url":"https://api.github.com/repos/zbeekman/json-fortran/comments{/number}","issue_comment_url":"https://api.github.com/repos/zbeekman/json-fortran/issues/comments{/number}","contents_url":"https://api.github.com/repos/zbeekman/json-fortran/contents/{+path}","compare_url":"https://api.github.com/repos/zbeekman/json-fortran/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zbeekman/json-fortran/merges","archive_url":"https://api.github.com/repos/zbeekman/json-fortran/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zbeekman/json-fortran/downloads","issues_url":"https://api.github.com/repos/zbeekman/json-fortran/issues{/number}","pulls_url":"https://api.github.com/repos/zbeekman/json-fortran/pulls{/number}","milestones_url":"https://api.github.com/repos/zbeekman/json-fortran/milestones{/number}","notifications_url":"https://api.github.com/repos/zbeekman/json-fortran/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zbeekman/json-fortran/labels{/name}","releases_url":"https://api.github.com/repos/zbeekman/json-fortran/releases{/id}","created_at":"2014-04-19T17:34:49Z","updated_at":"2015-02-23T14:31:57Z","pushed_at":"2015-02-24T15:58:17Z","git_url":"git://github.com/zbeekman/json-fortran.git","ssh_url":"git@github.com:zbeekman/json-fortran.git","clone_url":"https://github.com/zbeekman/json-fortran.git","svn_url":"https://github.com/zbeekman/json-fortran","homepage":null,"size":1866,"stargazers_count":0,"watchers_count":0,"language":"FORTRAN","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jacobwilliams:master","ref":"master","sha":"af3f172342d83ab6edee871213de5a23cd3e9dac","user":{"login":"jacobwilliams","id":6483379,"avatar_url":"https://avatars.githubusercontent.com/u/6483379?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobwilliams","html_url":"https://github.com/jacobwilliams","followers_url":"https://api.github.com/users/jacobwilliams/followers","following_url":"https://api.github.com/users/jacobwilliams/following{/other_user}","gists_url":"https://api.github.com/users/jacobwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobwilliams/subscriptions","organizations_url":"https://api.github.com/users/jacobwilliams/orgs","repos_url":"https://api.github.com/users/jacobwilliams/repos","events_url":"https://api.github.com/users/jacobwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/jacobwilliams/received_events","type":"User","site_admin":false},"repo":{"id":16651246,"name":"json-fortran","full_name":"jacobwilliams/json-fortran","owner":{"login":"jacobwilliams","id":6483379,"avatar_url":"https://avatars.githubusercontent.com/u/6483379?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobwilliams","html_url":"https://github.com/jacobwilliams","followers_url":"https://api.github.com/users/jacobwilliams/followers","following_url":"https://api.github.com/users/jacobwilliams/following{/other_user}","gists_url":"https://api.github.com/users/jacobwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobwilliams/subscriptions","organizations_url":"https://api.github.com/users/jacobwilliams/orgs","repos_url":"https://api.github.com/users/jacobwilliams/repos","events_url":"https://api.github.com/users/jacobwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/jacobwilliams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacobwilliams/json-fortran","description":"A Fortran 2008 JSON API","fork":false,"url":"https://api.github.com/repos/jacobwilliams/json-fortran","forks_url":"https://api.github.com/repos/jacobwilliams/json-fortran/forks","keys_url":"https://api.github.com/repos/jacobwilliams/json-fortran/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacobwilliams/json-fortran/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacobwilliams/json-fortran/teams","hooks_url":"https://api.github.com/repos/jacobwilliams/json-fortran/hooks","issue_events_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/events{/number}","events_url":"https://api.github.com/repos/jacobwilliams/json-fortran/events","assignees_url":"https://api.github.com/repos/jacobwilliams/json-fortran/assignees{/user}","branches_url":"https://api.github.com/repos/jacobwilliams/json-fortran/branches{/branch}","tags_url":"https://api.github.com/repos/jacobwilliams/json-fortran/tags","blobs_url":"https://api.github.com/repos/jacobwilliams/json-fortran/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacobwilliams/json-fortran/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacobwilliams/json-fortran/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacobwilliams/json-fortran/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacobwilliams/json-fortran/statuses/{sha}","languages_url":"https://api.github.com/repos/jacobwilliams/json-fortran/languages","stargazers_url":"https://api.github.com/repos/jacobwilliams/json-fortran/stargazers","contributors_url":"https://api.github.com/repos/jacobwilliams/json-fortran/contributors","subscribers_url":"https://api.github.com/repos/jacobwilliams/json-fortran/subscribers","subscription_url":"https://api.github.com/repos/jacobwilliams/json-fortran/subscription","commits_url":"https://api.github.com/repos/jacobwilliams/json-fortran/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacobwilliams/json-fortran/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacobwilliams/json-fortran/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacobwilliams/json-fortran/contents/{+path}","compare_url":"https://api.github.com/repos/jacobwilliams/json-fortran/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacobwilliams/json-fortran/merges","archive_url":"https://api.github.com/repos/jacobwilliams/json-fortran/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacobwilliams/json-fortran/downloads","issues_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues{/number}","pulls_url":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls{/number}","milestones_url":"https://api.github.com/repos/jacobwilliams/json-fortran/milestones{/number}","notifications_url":"https://api.github.com/repos/jacobwilliams/json-fortran/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacobwilliams/json-fortran/labels{/name}","releases_url":"https://api.github.com/repos/jacobwilliams/json-fortran/releases{/id}","created_at":"2014-02-08T19:34:13Z","updated_at":"2015-02-23T04:22:52Z","pushed_at":"2015-02-23T19:29:41Z","git_url":"git://github.com/jacobwilliams/json-fortran.git","ssh_url":"git@github.com:jacobwilliams/json-fortran.git","clone_url":"https://github.com/jacobwilliams/json-fortran.git","svn_url":"https://github.com/jacobwilliams/json-fortran","homepage":"","size":1997,"stargazers_count":15,"watchers_count":15,"language":"FORTRAN","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":14,"forks":4,"open_issues":14,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls/59"},"html":{"href":"https://github.com/jacobwilliams/json-fortran/pull/59"},"issue":{"href":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/59"},"comments":{"href":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jacobwilliams/json-fortran/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/jacobwilliams/json-fortran/statuses/3caa2272d9c8b0973faefec67b3464076524770b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":82,"deletions":25,"changed_files":4}}