Merge pull request #95 from AWS-Cloud-School-6/92-feat-get-api-동시-호출 #35
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: Build and Deploy to S3 | |
on: | |
push: | |
branches: [ main ] | |
# paths-ignore: | |
# - '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # 전체 히스토리 체크아웃 (선택사항) | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' # Node.js 버전 | |
- name: Print working directory | |
run: pwd | |
- name: Install dependencies | |
run: npm install | |
env: | |
REACT_APP_AWS_PROJECT_REGION: ${{ secrets.REACT_APP_AWS_PROJECT_REGION }} | |
REACT_APP_AWS_USER_POOLS_ID: ${{ secrets.REACT_APP_AWS_USER_POOLS_ID }} | |
REACT_APP_AWS_USER_POOLS_WEB_CLIENT_ID: ${{ secrets.REACT_APP_AWS_USER_POOLS_WEB_CLIENT_ID }} | |
working-directory: ./aiwa-mcp-frontend # 루트 디렉토리에서 작업 | |
- name: Build project | |
run: npm run build | |
env: | |
REACT_APP_AWS_PROJECT_REGION: ${{ secrets.REACT_APP_AWS_PROJECT_REGION }} | |
REACT_APP_AWS_USER_POOLS_ID: ${{ secrets.REACT_APP_AWS_USER_POOLS_ID }} | |
REACT_APP_AWS_USER_POOLS_WEB_CLIENT_ID: ${{ secrets.REACT_APP_AWS_USER_POOLS_WEB_CLIENT_ID }} | |
CI: false # CI 환경 변수를 false로 설정하여 경고를 오류로 처리하지 않도록 함 | |
working-directory: ./aiwa-mcp-frontend # 루트 디렉토리에서 작업 | |
# #### code guru 추가 ##### | |
# - name: CodeGuru Security | |
# uses: aws-actions/codeguru-security@v1 | |
# with: | |
# source_path: ./aiwa-mcp-frontend/src | |
# aws_region: ap-northeast-1 # 도쿄 리전 | |
- name: Upload to S3 | |
run: | | |
aws s3 sync ./aiwa-mcp-frontend/build/ s3://tf-test-hyeob-bucket-991906 --delete | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'ap-northeast-2' | |
# test-04 |