This is my personal website, built using GCP and AWS services as part of the Cloud Resume Challenge, accessible at deepansh.app.
This repository contains the frontend code for the Cloud Resume Challenge. The website is hosted on Google Cloud Storage (GCS) and Amazon Simple Storage Service (S3), pointing to a single domain: https://deepansh.app.
Click here for 👉 Cloud Resume Backend
cloud-resume-frontend/
├── .github/workflows/
│ ├── aws-workflow.yaml
│ ├── gcp-workflow.yml
├── frontend/
│ ├── index.html
│ ├── 404.html
│ ├── Deepansh-Singh-Resume.pdf
│ ├── images/
│ ├── css/
│ ├── js/
│ ├── nsfw/
├── README .md
└── ...
-
.github/workflows/: Contains GitHub Actions workflows for deploying to GCS and S3.
aws-workflow.yaml
: GitHub Actions workflow for deploying to AWS S3.gcp-workflow.yml
: GitHub Actions workflow for deploying to Google Cloud Storage.
-
frontend/: Contains the actual frontend code.
index.html
: The main HTML file for your website.404.html
: The HTML file displayed when a 404 error occurs. Try entering any path after the main domain :)images/
: Directory for storing images.css/
: Directory for storing CSS stylesheets.js/
: Directory for storing JavaScript files.nsfw/
: Additional directory for NSFW (Not Safe For Work) content. Accessible at https://deepansh.app/nsfw
-
Fork or Clone this repository.
-
Navigate to the cloud-resume-frontend directory:
cd cloud-resume-frontend
-
Explore the frontend/ directory to view and modify the website code.
- Run the terraform files present at cloud-resume-backend repository. Read the documentation to help get the infrastructure up and running. Or
- Manually create the infrastructure like GCS bucket and make it public using ACLs. Similarly, manually create the AWS s3 bucket, CloudFront distribution, a lambda function to fetch and update the viewer counter, a DynamoDB table to store the view counter, and Route 53 resources.
- Open and edit the gcp-workflow.yml file in .github/workflows/.
- Modify the values for the Google Cloud Service Account email, key, and bucket name if you plan just to test the code locally:
Or update these secrets inside your forked GitHub repository settings inside Actions -> secrets -> create new secrets.
secrets: GCP_SA_EMAIL: ${{ secrets.GCP_SA_EMAIL }} GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} GCS_BUCKET_NAME: ${{ secrets.GCS_BUCKET_NAME }}
- Push your changes to the main branch, and GitHub Actions will automatically deploy to GCS.
- Open and edit the aws-workflow.yaml file in .github/workflows/.
- Modify the values for the AWS S3 bucket, access key, secret access key, and CloudFront distribution:
Or update these secrets inside your forked GitHub repository settings inside Actions -> secrets -> create new secrets.
env: AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_CLOUDFRONT_DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }}
- Push your changes to the main branch, and GitHub Actions will automatically deploy to S3 and invalidate the CloudFront cache.
The Cloud Resume Frontend utilizes the following AWS services:
S3 Bucket: The static site is hosted in an S3 bucket.
Route 53: Manages DNS and directs requests to CloudFront CDN.
CloudFront CDN: Accelerates content delivery, backed by the S3 bucket, and enforces HTTPS.
AWS Certificate Manager (ACM): Issues TLS/SSL certificates for secure HTTPS connections.
Lambda Function: A Python Lambda function is triggered by an API Gateway endpoint, updating the visitor count in a DynamoDB database.
DynamoDB: Stores the visitor count data.
The Cloud Resume Frontend utilizes the following GCP services:
Google Cloud Storage: The GitHub code gets pushed to a Cloud Storage bucket.
Application Load Balancer: Makes the web app code publicly available by exposing the HTTPS endpoint globally.
Google Cloud CDN: For caching the web app contents closer to the user.
SSL Certificate: Google Certificate Manager is utilized for obtaining an SSL certificate.
Cloud Function and Firestore: Cloud Function and Firestore could have been used instead of Lambda and DynamoDB.
Cloud DNS: For domain management.