This is the frontend for my personal website. It's built with Gatsby.
Requirements:
- Node.js (LTS)
-
Install dependencies
npm install
-
Start the local server
npm start
-
View the site locally in your browser at
localhost:8000
Requirements:
- AWS profile
personal
that has access to the target S3 bucket
TARGET_BUCKET_NAME=glenwinters.com TARGET_ADDRESS=https://glenwinters.com npm run build
AWS_PROFILE=personal npm run deploy
The gatsby plugin will ask you to confirm that you're deploying to the correct bucket and region. Accept and it will push the new build to the S3 bucket.
To deploy to the staging environment, use the following env var values:
TARGET_BUCKET_NAME=staging.glenwinters.com
TARGET_ADDRESS=https://staging.glenwinters.com
On pull request commits, it builds and deploys to staging. On commits to main
, it builds and deploys to production. In both cases, it creates a CloudFront invalidation to bust the cache.