Skip to content

Commit

Permalink
Merge pull request #16 from Guzzing/feat/14-feature-cicd
Browse files Browse the repository at this point in the history
feat: 스터데이 S3 배포 워크플로우 생성
  • Loading branch information
HeeSeok-kim authored Oct 24, 2023
2 parents 6825690 + 6d96c64 commit 7c3c02b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/CodeDeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy to S3 and Invalidate CloudFront

on:
push:
branches:
- main # 또는 배포할 브랜치 이름

jobs:
build_and_deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies and build
run: |
npm install
npm run build
- name: Deploy to S3
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_ACCESS_KEY }}
AWS_REGION: 'ap-northeast-2'
SOURCE_DIR: 'dist' # React 빌드 결과물 디렉터리

0 comments on commit 7c3c02b

Please sign in to comment.