Skip to content

Commit e35baa5

Browse files
authored
Merge pull request #131 from Soohyuniii/fix/production-mode
fix: ci 수정
2 parents 921eac0 + 3fbe504 commit e35baa5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,21 @@ jobs:
2020
node-version: "20"
2121

2222
- name: Install dependencies
23-
run: |
24-
npm install
25-
npm install tailwindcss@latest postcss@latest autoprefixer@latest
26-
npm install --save-dev @types/node
23+
run: npm ci # npm install보다 빠르고, package-lock.json을 신뢰
2724

2825
- name: Create .env.production file # env 파일 생성 단계 추가
2926
run: |
3027
echo "VITE_GA_MEASUREMENT_ID=${{ secrets.VITE_GA_MEASUREMENT_ID }}" > .env.production
28+
echo "VITE_MODE=production" >> .env.production
3129
3230
- name: Run build
33-
run: |
34-
VITE_MODE=production npm run build --verbose
31+
env:
32+
NODE_ENV: production
33+
VITE_MODE: production
34+
run: npm run build -- --mode production --verbose
35+
36+
- name: Check built files (Debugging)
37+
run: grep -r "import.meta.env.MODE" dist/ || echo "No env mode found in built files"
3538

3639
- name: Docker build & push
3740
run: |

0 commit comments

Comments
 (0)