octopress / deploy

Deployment for Octopress and Jekyll blogs.
MIT License
75 stars 23 forks source link

enabling use of ERB inside _deploy.yml #62

Closed glaszig closed 9 years ago

glaszig commented 9 years ago

this patch puts the contents of _deploy.yml through ERB which enables, for example, use of custom environment variables for config option values.

i ran across this while upgrading a plain jekyll site to octopress. before that, i was using the jekyll-s3 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.

imathis commented 9 years ago

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.

ENV['AWS_ACCESS_KEY_ID']
ENV['AWS_SECRET_ACCESS_KEY']
ENV['AWS_DEFAULT_REGION']
ENV['AWS_DISTRIBUTION_ID']

See the code here.

glaszig commented 9 years ago

i know. but what if i want to use other env vars? for other settings in that file?

imathis commented 9 years ago

I've released this feature in version 1.3.0. Thanks for the PR!