Skip to content

Commit a1486b8

Browse files
committed
스테이징과 프로덕션에서 적절한 .env를 사용하도록 수정
1 parent e7509cc commit a1486b8

File tree

5 files changed

+22
-10
lines changed

5 files changed

+22
-10
lines changed

.env.prod

Lines changed: 0 additions & 1 deletion
This file was deleted.

.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
REACT_APP_PYCONKR_API=https://api.pycon.kr

.github/workflows/dev-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
- name: Build
3838
run: |
39-
yarn build
39+
yarn build:dev
4040
4141
- name: Deploy
4242
run: |

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@testing-library/user-event": "^13.5.0",
1919
"axios": "^1.6.8",
2020
"dotenv": "^16.4.5",
21+
"env-cmd": "^10.1.0",
2122
"hamburger-react": "^2.5.1",
2223
"react": "^18.2.0",
2324
"react-dom": "^18.2.0",
@@ -35,14 +36,12 @@
3536
"web-vitals": "^2.1.4"
3637
},
3738
"scripts": {
38-
"start": "react-scripts start",
39-
"start:prod": "react-scripts start",
40-
"build": "react-scripts build",
41-
"build:prod": "react-scripts build",
42-
"prestart": "./scripts/set_dev.sh",
43-
"prestart:prod": "./scripts/set_prod.sh",
44-
"prebuild": "chmod +x ./scripts/set_dev.sh || ./scripts/set_dev.sh",
45-
"prebuild:prod": "chmod +x ./scripts/set_prod.sh || ./scripts/set_prod.sh"
39+
"start": "env-cmd -f ./.env.local react-scripts start",
40+
"start:dev": "env-cmd -f ./.env.development react-scripts start",
41+
"start:prod": "env-cmd -f ./.env.production react-scripts start",
42+
"build": "env-cmd -f ./.env.local react-scripts build --profile",
43+
"build:dev": "env-cmd -f ./.env.development react-scripts build --profile",
44+
"build:prod": "env-cmd -f ./.env.production react-scripts build"
4645
},
4746
"eslintConfig": {
4847
"extends": [

yarn.lock

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5991,6 +5991,18 @@ __metadata:
59915991
languageName: node
59925992
linkType: hard
59935993

5994+
"env-cmd@npm:^10.1.0":
5995+
version: 10.1.0
5996+
resolution: "env-cmd@npm:10.1.0"
5997+
dependencies:
5998+
commander: ^4.0.0
5999+
cross-spawn: ^7.0.0
6000+
bin:
6001+
env-cmd: bin/env-cmd.js
6002+
checksum: efef55074250f14cfc0b80c98dd98f1f056a80e1f3c7db14097ceefdd2d56c766bbb83b54c22932112707f41b36ce2e923f8015d69e62a75c12d98640b972e75
6003+
languageName: node
6004+
linkType: hard
6005+
59946006
"env-paths@npm:^2.2.0":
59956007
version: 2.2.1
59966008
resolution: "env-paths@npm:2.2.1"
@@ -11906,6 +11918,7 @@ __metadata:
1190611918
"@types/react-redux": ^7.1.33
1190711919
axios: ^1.6.8
1190811920
dotenv: ^16.4.5
11921+
env-cmd: ^10.1.0
1190911922
eslint-config-prettier: ^9.1.0
1191011923
eslint-plugin-prettier: ^5.1.3
1191111924
hamburger-react: ^2.5.1

0 commit comments

Comments
 (0)