This repository contains the source code and deployment scripts for a static website built with Gatsby and deployed to AWS S3 using CloudFront for content delivery.
This project is a static website built using Gatsby, a React-based framework for creating fast and modern websites. The website is hosted on AWS S3, with AWS CloudFront used as a CDN (Content Delivery Network) to deliver the content quickly and securely to users around the globe.
The website is accessible at morphic.bio.
Before you begin, ensure you have the following installed on your local machine:
npm install -g gatsby-cli
Ensure that you have the following AWS resources set up:
Clone the repository:
git clone https://github.com/ebi-ait/morphic-website.git
cd morphic-website
Install dependencies:
npm install
To build the Gatsby site for production:
gatsby build
This command will generate the static files in the public directory. Deployment
To deploy the site to AWS S3 and invalidate the CloudFront cache:
Deploy to S3:
You can use the AWS CLI or any S3 deployment tool. Here’s an example using the AWS CLI:
aws s3 sync ./public s3://your-s3-bucket-name --delete
Invalidate CloudFront Cache:
After deploying the changes to S3, invalidate the CloudFront cache to ensure the changes are reflected immediately:
aws cloudfront create-invalidation --distribution-id your-distribution-id --paths "/*"
Accessing the Website
Once the deployment is complete, your website will be available at https://morphic.bio Contributing
If you would like to contribute to this project, please follow these steps:
1. Fork the repository.
2. Create a new branch (git checkout -b feature-branch-name).
3. Make your changes and commit them (git commit -m 'Add some feature').
4. Push to the branch (git push origin feature-branch-name).
5. Open a Pull Request.