Personal website for https://juliarubio.com.ar (alias: https://www.juliarubio.com.ar).
- You need to have
aws cli
configured with a profile namedphdcandidateprofile
, and then run the following command:
aws s3 sync . s3://juliarubio.com.ar/ --delete --exclude "node_modules/*" --exclude ".*" --exclude "package.json" --exclude "yarn.lock" --exclude "*/.DS_Store" --exclude "*.md" --profile phdcandidateprofile
Alternatively, there's a script configured so you should be able to achieve the same with yarn deploy
.
- After syncing the s3 bucket, you might need to invalidate the Cloudfront cache, here's how to invalidate all files (you can achieve the same with command the
yarn invalidate-cache
):
aws cloudfront create-invalidation --distribution-id EDLQXRHCFP7M9 --paths "/*" --profile phdcandidateprofile
- Deploying via Github Actions: see file under
.github/workflows.main.yml
. There is configuration defined using Github Actions tools to be able to deploy, set headers and invalidate cache after a merge or push tomaster
branch.
Caching for images should be configured in AWS with the following metadata:
System defined Cache-Control max-age=31536000
System defined Content-Type image/jpeg
This can be done automatically by using task yarn set-cache-headers
.
SSL was certificate generated using AWS Certificate Manager. Using a certificate which support both domains: juliarubio.com.ar and www.juliarubio.com.ar (additional name).
In order to use the new certificate, you need to set this up in the CloudFront distribution.
Just run yarn serve
and the website will spin up in http://localhost:5000.