Skip to content

Commit

Permalink
added s3cmd and git continuous deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
pckben committed Apr 7, 2013
1 parent d433478 commit 3f82cb8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _layouts/default.html
@@ -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>
Expand Down
21 changes: 21 additions & 0 deletions _posts/2013-04-07-hosting-static-sites-on-s3-with-naked-domains.md
Expand Up @@ -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.