diff --git a/.github/workflows/conceptbe-fe-cd.yml b/.github/workflows/conceptbe-fe-cd.yml new file mode 100644 index 00000000..b8abe268 --- /dev/null +++ b/.github/workflows/conceptbe-fe-cd.yml @@ -0,0 +1,44 @@ +name: conceptbe-fe-cd + +on: + pull_request: + branches: [develop] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout source code. + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Generate build + run: npm run build + + - name: Docker Image Build + run: docker build -t pjhg410/conceptbe-fe . + + - name: Docker Hub Login + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Docker Hub push + run: docker push pjhg410/conceptbe-fe + + - name: Docker Pull And run + uses: appleboy/ssh-action@v0.1.6 + with: + host: ${{ secrets.WAS_HOST }} + username: ${{ secrets.WAS_USERNAME }} + password: ${{ secrets.WAS_PASSWORD }} + port: ${{ secrets.WAS_SSH_PORT }} + script: | + docker stop frontend + docker rm frontend + docker pull pjhg410/conceptbe-fe + docker run -d -p 3000:3000 --name frontend pjhg410/conceptbe-fe diff --git a/src/pages/Feed/Feed.page.tsx b/src/pages/Feed/Feed.page.tsx index 91fc621d..5c117a4a 100644 --- a/src/pages/Feed/Feed.page.tsx +++ b/src/pages/Feed/Feed.page.tsx @@ -8,7 +8,7 @@ import NewIdeaCardListSection from './components/NewIdeaCardListSection/NewIdeaC import { getUserNickname } from './utils/getUserNickname'; import Padding from '../../components/Padding'; import Logo from '../../layouts/Logo'; -import { useWritingInfoQuery } from '../write/hooks/queries/useWritingInfoQuery'; +import { useWritingInfoQuery } from '../Write/hooks/queries/useWritingInfoQuery'; const Feed = () => { const [isFilterBottomSheetOpen, setIsFilterBottomSheetOpen] = useState(false); diff --git a/src/pages/Feed/components/FilterBottomSheet/FilterBottomSheet.tsx b/src/pages/Feed/components/FilterBottomSheet/FilterBottomSheet.tsx index b0a0d5cb..ba546aa4 100644 --- a/src/pages/Feed/components/FilterBottomSheet/FilterBottomSheet.tsx +++ b/src/pages/Feed/components/FilterBottomSheet/FilterBottomSheet.tsx @@ -13,8 +13,8 @@ import { useRadio, } from 'concept-be-design-system'; -import RecruitmentPlaceSection from '../../../write/components/RecruitmentPlaceSection'; -import { Idea } from '../../../write/types'; +import RecruitmentPlaceSection from '../../../Write/components/RecruitmentPlaceSection'; +import { Idea } from '../../../Write/types'; import { useFilterParams } from '../../context/filterContext'; const cooperationWays = [ diff --git a/src/pages/Feed/hooks/mutations/useDeleteBookmarkIdea.ts b/src/pages/Feed/hooks/mutations/useDeleteBookmarkIdea.ts index 2c783536..a6826dee 100644 --- a/src/pages/Feed/hooks/mutations/useDeleteBookmarkIdea.ts +++ b/src/pages/Feed/hooks/mutations/useDeleteBookmarkIdea.ts @@ -1,7 +1,7 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; import { http } from '../../../../api/http'; -import { memberId } from '../../../profile/utils/memberId'; +import { memberId } from '../../../Profile/utils/memberId'; const _deleteBookmarkIdea = (ideaId: number) => { return http.delete(`/bookmark/${ideaId}`);