File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Frontend CI (Vite Build)
2+
3+ on :
4+ push :
5+ branches : [ "main" ] # 브랜치 이름이 master라면 수정 필요
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ build-check :
11+ runs-on : ubuntu-latest
12+
13+ strategy :
14+ matrix :
15+ node-version : [20.x] # Vite 6.x는 최신 Node 버전(18, 20+) 권장
16+
17+ steps :
18+ # 1. 코드 가져오기
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ # 2. Node.js 설정
23+ - name : Setup Node.js ${{ matrix.node-version }}
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : ${{ matrix.node-version }}
27+ cache : ' npm'
28+
29+ # 3. 의존성 설치
30+ # package-lock.json이 있다면 npm ci가 더 빠르고 안전합니다.
31+ # 만약 lock 파일이 없다면 npm install로 변경해서 사용하세요.
32+ - name : Install dependencies
33+ run : npm ci
34+
35+ # 4. 빌드 확인 (핵심 단계)
36+ # Vite 빌드가 실패하면 여기서 에러가 나고, PR에 빨간불이 들어옵니다.
37+ - name : Build Project
38+ run : npm run build
You can’t perform that action at this time.
0 commit comments