Skip to content

Commit 0af889c

Browse files
authored
Merge pull request #153 from Soohyuniii/feature/cicd-설정-수정내용-반영
feat: cicd 설정
2 parents 3440b17 + 41ce066 commit 0af889c

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ jobs:
1919
with:
2020
node-version: "20"
2121

22-
- name: Install dependencies
22+
- name: Create .env.production file
2323
run: |
24-
npm install
25-
npm install tailwindcss@latest postcss@latest autoprefixer@latest
26-
npm install --save-dev @types/node
24+
echo "MODE=production" > .env.production
25+
echo "VITE_GA_MEASUREMENT_ID=${{ secrets.VITE_GA_MEASUREMENT_ID }}" >> .env.production
2726
28-
- name: Create .env file # env 파일 생성 단계 추가
29-
run: |
30-
echo "VITE_GA_MEASUREMENT_ID=${{ secrets.VITE_GA_MEASUREMENT_ID }}" > .env
27+
- name: Install dependencies
28+
run: npm ci
3129

3230
- name: Run build
33-
run: npm run build --mode production --verbose # 프로젝트에 맞는 빌드 명령어
31+
env:
32+
NODE_ENV: production
33+
run: npm run build -- --mode production
3434

3535
- name: Docker build & push
3636
run: |

vite.config.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import fs from "fs";
88
// vite.config.ts 파일에서 alias 설정을 추가해야 합니다.
99

1010
export default defineConfig(({ mode }: { mode: string }) => {
11-
console.log("mode", mode);
12-
1311
const isProduction = mode === "production";
1412
const keyPath = "./certs/key.pem";
1513
const certPath = "./certs/cert.pem";
@@ -21,10 +19,7 @@ export default defineConfig(({ mode }: { mode: string }) => {
2119
strictPort: true,
2220
allowedHosts: ["mbtips.kr"],
2321
hmr: isProduction
24-
? {
25-
host: "mbtips.kr",
26-
protocol: "wss"
27-
}
22+
? false
2823
: {
2924
host: "localhost",
3025
protocol: "wss"
@@ -56,10 +51,7 @@ export default defineConfig(({ mode }: { mode: string }) => {
5651
find: "@/constants",
5752
replacement: path.resolve(__dirname, "src/constants")
5853
},
59-
{
60-
find: "@/store",
61-
replacement: path.resolve(__dirname, "src/store")
62-
},
54+
6355
{
6456
find: "@/libs",
6557
replacement: path.resolve(__dirname, "src/libs")

0 commit comments

Comments
 (0)