So a number of folks have described how to use Octopress with S3. However most of them don't describe how to easily publish to S3, or require an external command-line tool to upload the generate files. I solved this by using the
aws/s3 gem and creating a new rake task.
rake deploy_s3[blog] # deploys all blog files
I also added a task to ping Google and ...
So, uploading to S3 is not always as simple as it should be. Here's a completely self-contained Groovy script that can upload files to your S3 bucket, plus provide a signed link to access the uploaded file.
The script uses Groovy's
Grab macro to download the JetS3t library which does the heavy lifting.
#!/opt/groovy/bin/groovy /* Script to manipulate S3 objects. * @author Tom Nichols * @see ...