Permalink
Browse files

added s3cmd and git continuous deployment

  • Loading branch information...
1 parent d433478 commit 3f82cb8c5bae937439b981ac5b0b60404c7c1adf @pckben committed Apr 7, 2013
Showing with 23 additions and 2 deletions.
  1. +2 −2 _layouts/default.html
  2. +21 −0 _posts/2013-04-07-hosting-static-sites-on-s3-with-naked-domains.md
View
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html>
<head>
- <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
- <link rel="icon" href="favicon.ico" type="image/x-icon" />
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+ <link rel="icon" href="/favicon.ico" type="image/x-icon" />
<script type='text/javascript' src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<script type='text/javascript' src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
@@ -39,3 +39,24 @@ associated with using a naked domain, if it is configured as redirecting to its
www subdomain using free services such as [wwwizer.com](http://wwwizer.com/).
The details on configuring Amazon S3 and Route 53 is
[here](http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html).
+
+## 4. Deploying with `s3cmd`
+
+Using git and the [`s3cmd`
+tool](/2013/04/07/mac-osx-uploading-files-to-amazon-s3/), we can have out
+website developed in a private git repository, such as
+[BitBucket](https://bitbucket.org/), and then pushes the production branch to
+Amazon S3 automatically. Below is the command to sync your local production
+directory with an S3 bucket. You can also set up a git hook to sync this
+directory automatically for continuous deployment.
+
+{% highlight bash %}
+s3cmd sync \
+ --recursive \
+ --acl-public \
+ --exclude '.git*/*' \
+ --exclude '*.swp' \
+ --exclude 'Makefile' \
+ /path/to/local/dir \
+ s3://path/to/remote/bucket
+{% endhighlight %}

0 comments on commit 3f82cb8

Please sign in to comment.