๐ง ๋ชจ๋ ธ๋ ํฌ๋ก ๋ณ๊ฒฝํ๊ธฐ์ ์ปค๋ฐ #7
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: CI Pipeline | |
| # ์ํฌํ๋ก์ฐ ์คํ ์กฐ๊ฑด | |
| on: | |
| pull_request: | |
| branches: ["main", "dev"] | |
| push: | |
| branches: ["main", "dev", "feature/*"] | |
| # ์คํ๋ ์์ (Job)๋ค | |
| jobs: | |
| # ๋น๋ ๋ฐ ํ ์คํธ๋ฅผ ๋ด๋นํ๋ ๋ฉ์ธ ์์ | |
| build: | |
| # ๊ฐ์ ํ๊ฒฝ ์ง์ | |
| runs-on: ubuntu-latest | |
| # ์์ ๋จ๊ณ(Step)๋ค | |
| steps: | |
| # 1. ๋ ํฌ์งํ ๋ฆฌ ์ฝ๋ ์ฒดํฌ์์ | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| # 2. Node.js ํ๊ฒฝ ์ค์ | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" # ์ค์! -> ํ๋ก์ ํธ์ ๋ง๋ Node.js ๋ฒ์ ์ง์ | |
| # 3. NPM ์์กด์ฑ ์บ์ฑ (2๋จ๊ณ Dependency Install ์ต์ ํ) | |
| # - node_modules ํด๋๋ฅผ ์บ์ฑํ์ฌ ๋งค๋ฒ ์๋ก ์ค์นํ๋ ์๊ฐ ์ ์ฝ | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| # 4. ์์กด์ฑ ์ค์น (2๋จ๊ณ Dependency Install) | |
| # - CI ํ๊ฒฝ์์๋ 'npm ci'๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ๋ ๋น ๋ฅด๊ณ ์์ ์ . | |
| - name: Install Dependencies | |
| run: npm ci | |
| # 5. ๋น๋ ์ ํจ์ฑ ๊ฒ์ฌ (3๋จ๊ณ Build Validation) | |
| - name: Run Build | |
| run: npm run build |