{"action":"created","issue":{"url":"https://api.github.com/repos/octopress/deploy/issues/62","labels_url":"https://api.github.com/repos/octopress/deploy/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/octopress/deploy/issues/62/comments","events_url":"https://api.github.com/repos/octopress/deploy/issues/62/events","html_url":"https://github.com/octopress/deploy/pull/62","id":92944576,"number":62,"title":"enabling use of ERB inside _deploy.yml","user":{"login":"glaszig","id":201135,"avatar_url":"https://avatars.githubusercontent.com/u/201135?v=3","gravatar_id":"","url":"https://api.github.com/users/glaszig","html_url":"https://github.com/glaszig","followers_url":"https://api.github.com/users/glaszig/followers","following_url":"https://api.github.com/users/glaszig/following{/other_user}","gists_url":"https://api.github.com/users/glaszig/gists{/gist_id}","starred_url":"https://api.github.com/users/glaszig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glaszig/subscriptions","organizations_url":"https://api.github.com/users/glaszig/orgs","repos_url":"https://api.github.com/users/glaszig/repos","events_url":"https://api.github.com/users/glaszig/events{/privacy}","received_events_url":"https://api.github.com/users/glaszig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-03T22:35:12Z","updated_at":"2015-07-04T03:28:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/octopress/deploy/pulls/62","html_url":"https://github.com/octopress/deploy/pull/62","diff_url":"https://github.com/octopress/deploy/pull/62.diff","patch_url":"https://github.com/octopress/deploy/pull/62.patch"},"body":"this patch puts the contents of `_deploy.yml` through ERB which enables, for example, use of custom environment variables for config option values.\r\n\r\ni ran across this while upgrading a plain jekyll site to octopress. before that, i was using the [jekyll-s3][0] gem to push to s3. while moving all options from `_jekyll-s3.yml` to `_deploy.yml` i also copied erb code from one to the other which resulted in me not being able to push. the config defaults have been enough for me but i think this can be helpful for others in the progress of migrating and also everybody who's either not using default names for env vars or wishes to use other env vars for any option.\r\n\r\n[0]: https://github.com/laurilehmijoki/jekyll-s3"},"comment":{"url":"https://api.github.com/repos/octopress/deploy/issues/comments/118454362","html_url":"https://github.com/octopress/deploy/pull/62#issuecomment-118454362","issue_url":"https://api.github.com/repos/octopress/deploy/issues/62","id":118454362,"user":{"login":"imathis","id":12732,"avatar_url":"https://avatars.githubusercontent.com/u/12732?v=3","gravatar_id":"","url":"https://api.github.com/users/imathis","html_url":"https://github.com/imathis","followers_url":"https://api.github.com/users/imathis/followers","following_url":"https://api.github.com/users/imathis/following{/other_user}","gists_url":"https://api.github.com/users/imathis/gists{/gist_id}","starred_url":"https://api.github.com/users/imathis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imathis/subscriptions","organizations_url":"https://api.github.com/users/imathis/orgs","repos_url":"https://api.github.com/users/imathis/repos","events_url":"https://api.github.com/users/imathis/events{/privacy}","received_events_url":"https://api.github.com/users/imathis/received_events","type":"User","site_admin":false},"created_at":"2015-07-04T03:28:24Z","updated_at":"2015-07-04T03:28:24Z","body":"Thanks for the PR, but you actually don't need to use ERB for your S3 keys. Deployment to S3 automatically reads your environment variables as follows.\r\n\r\n```\r\nENV['AWS_ACCESS_KEY_ID']\r\nENV['AWS_SECRET_ACCESS_KEY']\r\nENV['AWS_DEFAULT_REGION']\r\nENV['AWS_DISTRIBUTION_ID']\r\n```\r\n\r\nSee the code [here](https://github.com/octopress/deploy/blob/master/lib/octopress-deploy/s3.rb#L17)."}}