Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 1.87 KB

README.md

File metadata and controls

44 lines (26 loc) · 1.87 KB

Dr of Political Science website

Personal website for https://juliarubio.com.ar (alias: https://www.juliarubio.com.ar).


Production Deployment

  • You need to have aws cli configured with a profile named phdcandidateprofile, 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 to master branch.

Caching

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 Certificate

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.

Local environment

Just run yarn serve and the website will spin up in http://localhost:5000.