Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
css
 
 
img
 
 
js
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

rob.gant.ninja

Personal Website

Deployment

Install AWS CLI, S3cmd and Terraform:

brew tap hashicorp/tap
brew install awscli hashicorp/tap/terraform s3cmd

Configure AWS: aws configure. Use profiles, don't setup default credentials. If you want to stop tying --profile then use export AWS_PROFILE=personal.

Configure s3cmd: s3cmd --configure

Manually sync website files

Terraform might update the website bucket if you mark that resource as tainted, but it is probably easier to just do the command yourself.

s3cmd sync --no-preserve --cf-invalidate --cf-invalidate-default-index --delete-removed --exclude=* --rinclude-from=dist-files ./ s3://rob-gant-ninja/

By default s3cmd sync preserves file attributes as metadata on the s3 key and that data is then converted into an HTTP header in the response. Using --no-preserve won't impact the ability of sync to check for changed files.

Future

When we build the website we should be able to cachebust the asset/css/img/js file names using a hash and we won't need --cf-invalidate.

Should also setup Cache-Control Headers once we have cachebusting setup.

Static Site Generator

About

Personal Website

Resources

License

Releases

No releases published

Packages

No packages published