Refactored rate limiter #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Vite React App to AWS S3 | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: | | |
cd react-client | |
npm install | |
- name: Configure .env file | |
run: | | |
cd react-client | |
echo "VITE_SOCKS_API_URL = https://ecs.the-sock-exchange.com/api/socks" > .env | |
echo "VITE_ENVIRONMENT = production" >> .env | |
- name: Build Vite React app | |
run: | | |
cd react-client | |
npm run build | |
- name: Set up AWS CLI | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | |
aws-region: us-west-2 | |
- name: Sync build directory to S3 | |
run: | | |
aws s3 sync ./react-client/dist s3://the-sock-exchange-react-edp-june --delete | |