Skip to content

Instantly share code, notes, and snippets.

@mwfrost
Last active December 20, 2015 19:09
Show Gist options
  • Select an option

  • Save mwfrost/6180923 to your computer and use it in GitHub Desktop.

Select an option

Save mwfrost/6180923 to your computer and use it in GitHub Desktop.

After provisioning an EC2 instance and opening up HTTP traffic, here are the commands I ran via ssh:

sudo yum install httpd

sudo apachectl start

sudo yum install R

which R

git clone https://github.com/mwfrost/MWFrost.com.git mwfrost.com

sudo git clone https://github.com/mwfrost/MWFrost.com.git mwfrost.com

rsync command to post site contents to parent folder:

cd mwfrost.com

sudo rsync -a ./_site/ ../ --exclude='.git*'`

Setting up cron jobs to fetch the repository and sync the public site: https://forums.aws.amazon.com/thread.jspa?messageID=405806

Paste the rsync code into a new bash file:

sudo nano site_refresh.sh

Contents of the bash file:

cd /var/www/html/mwfrost.com

sudo git fetch

sudo rsync -a ./_site/ ../ --exclude='.git*'

Test with bash site_refresh.sh

http://54.227.144.65/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment