-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from peauty/feature/deploy
Feat: Develop 자동 배포 및 typescript 타입 체크 액션 추가
- Loading branch information
Showing
5 changed files
with
2,979 additions
and
1,511 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: React build | ||
on: | ||
push: | ||
branches: | ||
- develop # 개발서버 배포 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code # 레포지토리 체크아웃 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache node modules # node_modules 캐싱 | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
- name: Install Dependencies # 의존성 설치 | ||
run: yarn install | ||
|
||
- name: Build # React 빌드 | ||
run: yarn build | ||
|
||
- name: Deploy to S3 # S3에 배포 | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME_DEV }} | ||
run: | | ||
aws s3 cp \ | ||
--recursive \ | ||
--region $AWS_REGION \ | ||
dist s3://$S3_BUCKET_NAME |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: TypeScript Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- feature/** | ||
|
||
jobs: | ||
type-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source code # 레포지토리 체크아웃 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js # Node.js 설정 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 22 # 프로젝트에 맞는 Node.js 버전을 설정 | ||
|
||
- name: Install dependencies # 의존성 설치 | ||
run: yarn install | ||
|
||
- name: Run TypeScript check # 타입스크립트 체크 | ||
run: yarn tsc --noEmit | ||
|
||
- name: Build the project # 프로젝트 빌드 | ||
run: yarn build |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
Oops, something went wrong.