Skip to content

Merge pull request #7 from kjs222/backend-tweaks #6

Merge pull request #7 from kjs222/backend-tweaks

Merge pull request #7 from kjs222/backend-tweaks #6

Workflow file for this run

name: Deploy to production
on:
push:
branches:
- main
jobs:
deploy-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
cd backend
npm install
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_SECRET_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy backend
run: |
cd backend
npx cdk deploy --require-approval never
deploy-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
cd frontend
npm install
- name: Create .env file
run: |
cd frontend
echo "REACT_APP_API_URL=${{ secrets.REACT_APP_API_URL }}" > .env
- name: Build frontend
run: |
cd frontend
npm run build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_SECRET_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy frontend
run: |
cd frontend/infrastructure
npx cdk deploy --require-approval never