diff --git a/.github/workflows/cinebox_fe.yaml b/.github/workflows/cinebox_fe.yaml index 1ec19c7..689864c 100644 --- a/.github/workflows/cinebox_fe.yaml +++ b/.github/workflows/cinebox_fe.yaml @@ -31,8 +31,12 @@ jobs: - name: Make .env file run: | - touch ./.env - echo "${{ secrets.ENV }}" > ./.env + if [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then + echo "${{ secrets.ENV_DEV }}" > .env + elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then + echo "${{ secrets.ENV }}" > .env + fi + cat .env # 디버깅을 위해 출력 shell: bash - name: Verify .env file @@ -41,6 +45,8 @@ jobs: - name: Build with npm run: | CI=false npm run build || { echo "Build failed!"; exit 1; } + env: + REACT_APP_NODE_ENV: ${{ github.ref == 'refs/heads/develop' && 'development' || 'production' }} - name: Verify build output run: du -sh ./build diff --git a/src/components/booking/Calendar.js b/src/components/booking/Calendar.js index f104ae2..6aac2b5 100644 --- a/src/components/booking/Calendar.js +++ b/src/components/booking/Calendar.js @@ -5,7 +5,6 @@ const Calendar = ({ currentDate, changeMonth, calendarDays, handleDateSelect, se const daysOfWeek = ['일', '월', '화', '수', '목', '금', '토']; - const formatDate = (date) => { // 'YYYY-MM-DD' 형식으로 변환 const dateObj = (date instanceof Date) ? date : new Date(date); diff --git a/src/templates/header.js b/src/templates/header.js index acf552b..32e58af 100644 --- a/src/templates/header.js +++ b/src/templates/header.js @@ -29,7 +29,7 @@ const Header = () => { - {context.userId && 마이페이지} + {context.userId && 마이페이지dev} {context.role == 'ADMIN' && 어드민 페이지} @@ -49,4 +49,4 @@ const Header = () => { ; }; -export default Header; \ No newline at end of file +export default Header;