Skip to content

Create CI_CD_Documentation.md #3

Create CI_CD_Documentation.md

Create CI_CD_Documentation.md #3

Workflow file for this run

name: React CI/CD app
on:
push:
branches:
- master
jobs:
build-react-server:
runs-on: ubuntu-latest
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: npm ci --no-optional --ignore-scripts
- name: Build project
run: |
export NODE_ENV=production
npm run build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy to S3 bucket
run: |
aws s3 sync dist/ s3://react-app-project1 --delete