Created
October 4, 2014 01:20
-
-
Save joho/ecfe17984d211fcbd293 to your computer and use it in GitHub Desktop.
Building and deploying static sites to s3 with http://harpjs.com/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### build | |
make clean all | |
### deploy | |
# script to export AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (varies per project usually) | |
. ~/bin/aws_s3 | |
# use http://aws.amazon.com/cli/ to sync up the folder to a bucket set up like http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html | |
aws s3 sync dist/ s3://shoutcloud.io --region=ap-southeast-2 --delete --exclude '.*' --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Variables | |
SRC=src | |
DIST=dist | |
# Destroy the final targets | |
clean: | |
rm -rf $(DIST)/* | |
# Compile the final targets | |
all: | |
harp compile $(SRC) $(DIST) | |
server: | |
harp server $(SRC) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment