#18 ci(fe): peer dependency설정 #15
Workflow file for this run
This file contains hidden or 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 Lint | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: | |
| - dev | |
| - main | |
| push: | |
| branches: | |
| - fe-ci/cicd | |
| jobs: | |
| build: | |
| name: Build and Test | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: 8 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' # Node.js 버전 20으로 변경 | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| path: | | |
| node_modules | |
| .pnpm-store | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: | | |
| cd src/frontend | |
| pnpm install --strict-peer-dependencies=false --frozen-lockfile --prod # 충돌을 해결하는 옵션 | |
| pnpm add turbo --save-dev -w # turbo를 루트 devDependencies에 추가 | |
| - name: Lint code | |
| run: | | |
| cd src/frontend | |
| pnpm lint | |
| - name: Build project | |
| run: | | |
| cd src/frontend | |
| pnpm build | |
| - name: Build Storybook | |
| run: | | |
| cd src/frontend | |
| pnpm build-storybook |