Personal website & blog. Build & Deploy to AWS S3, Cloudfront.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
articles
blogposts
css
files/vmware
imgs
js
pages
tools
uploads
.gitignore
README.md
build.tf
composer.json
composer.lock
composer.phar
favicon.ico
index.php
robots.txt

README.md

craig.mayhew.io

Craig Mayhew's Personal website

Blog posts are stored in blogposts/ as json files. One file per post. Pages are stored in pages/ as json files. One file per page.

PHP is used to generate static html in the htdocs directory and then optionally sync that to an S3 bucket.

install

php composer.phar selfupdate
php composer.phar install

Optionally, if you intend to deploy to S3, you need to add your credentials to your home folder. The file needs permission 600 ~/.aws/credentials

[default]
aws_access_key_id = SECRET_ID
aws_secret_access_key = SECRET_KEY

deploy

cd tools
php build.php
php uploadeToS3.php

partial deploy

You can specify what should be regenerated via arguments to build.php. e.g. to deploy just the blog and pages

php build.php blog pages 

Or just regenerate the web pages and static content.

php build.php pages static 

Finally, deploy.

php uploadeToS3.php