Skip to content

Commit 2ff38fd

Browse files
authored
Merge pull request #138 from Soohyuniii/fix/production-mode
fix: ci 설정
2 parents a3ea983 + 14840ce commit 2ff38fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ jobs:
2121

2222
- name: Create .env.production file
2323
run: |
24+
echo "NODE_ENV=production" > .env.production
2425
echo "MODE=production" > .env.production
2526
echo "VITE_GA_MEASUREMENT_ID=${{ secrets.VITE_GA_MEASUREMENT_ID }}" >> .env.production
2627
2728
- name: Install dependencies
2829
run: npm ci
2930

3031
- name: Run build
32+
env:
33+
NODE_ENV: production
3134
run: npm run build -- --mode production
3235

3336
- name: Verify Build Mode
@@ -37,6 +40,9 @@ jobs:
3740
- name: Debug .env.production file
3841
run: cat .env.production || echo ".env.production not found"
3942

43+
- name: Verify Build Mode in Output Files
44+
run: grep -r "import.meta.env" dist/ || echo "No env variables found in built files"
45+
4046
- name: Docker build & push
4147
run: |
4248
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}

0 commit comments

Comments
 (0)