diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..3a421e6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,58 @@ +name: MAIN CI + +on: + push: + branches: + - main + +jobs: + Deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout source code + uses: actions/checkout@v3 + + - name: Install pnpm + run: | + npm install -g pnpm + + - name: Get pnpm store path + id: pnpm-cache-path + run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV + + - name: Cache pnpm modules + id: cache + uses: actions/cache@v3 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + ${{ runner.os }}- + + - name: Install Dependencies + run: | + pnpm install --frozen-lockfile + pnpm store prune + + - name: Set up .env file + run: | + echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" > .env.production + echo "HTTPS=true" >> .env.production + + - name: Build + run: pnpm run build + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + + - name: Deploy to S3 + run: aws s3 sync ./dist s3://${{ secrets.AWS_BUCKET_NAME }} --delete + + - name: Invalidate CloudFront Cache + run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} --paths "/*" diff --git a/src/assets/images/background-dark.png b/src/assets/images/background-dark.png new file mode 100644 index 0000000..ed737c5 Binary files /dev/null and b/src/assets/images/background-dark.png differ diff --git a/src/assets/images/field-4-dark.png b/src/assets/images/field-4-dark.png new file mode 100644 index 0000000..0f6ab5b Binary files /dev/null and b/src/assets/images/field-4-dark.png differ diff --git a/src/assets/images/field-theme-asset-bird-dark.png b/src/assets/images/field-theme-asset-bird-dark.png new file mode 100644 index 0000000..ffaac1c Binary files /dev/null and b/src/assets/images/field-theme-asset-bird-dark.png differ diff --git a/src/assets/images/home-left-mountain-dark.png b/src/assets/images/home-left-mountain-dark.png new file mode 100644 index 0000000..f49e739 Binary files /dev/null and b/src/assets/images/home-left-mountain-dark.png differ diff --git a/src/assets/images/home-right-mountain-bottom-dark.png b/src/assets/images/home-right-mountain-bottom-dark.png new file mode 100644 index 0000000..efde328 Binary files /dev/null and b/src/assets/images/home-right-mountain-bottom-dark.png differ diff --git a/src/assets/images/home-right-mountain-top-dark.png b/src/assets/images/home-right-mountain-top-dark.png new file mode 100644 index 0000000..ca10f5f Binary files /dev/null and b/src/assets/images/home-right-mountain-top-dark.png differ diff --git a/src/assets/images/landing-dark.png b/src/assets/images/landing-dark.png new file mode 100644 index 0000000..14ebe02 Binary files /dev/null and b/src/assets/images/landing-dark.png differ diff --git a/src/layouts/PrivateRoute.tsx b/src/layouts/PrivateRoute.tsx index a433bc4..fd9a26d 100644 --- a/src/layouts/PrivateRoute.tsx +++ b/src/layouts/PrivateRoute.tsx @@ -6,6 +6,7 @@ import { useServerSentEvents } from '@/hooks/useServerSentEvents'; import Toast from '@/components/Toast'; export default function PrivateRoute() { + useServerSentEvents(); const isLoggedIn = useAuthStore((state) => state.isLoggedIn); const navigate = useNavigate(); diff --git a/src/main.tsx b/src/main.tsx index 41bea78..e5b67d3 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,5 +1,5 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { StrictMode } from 'react'; +// import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { BrowserRouter } from 'react-router'; diff --git a/src/pages/Auth/index.tsx b/src/pages/Auth/index.tsx index 6097e53..045cb79 100644 --- a/src/pages/Auth/index.tsx +++ b/src/pages/Auth/index.tsx @@ -37,6 +37,8 @@ const AuthCallbackPage = () => { if (userInfo.accessToken) setAccessToken(userInfo.accessToken); accessToken = userInfo.accessToken; + console.log(redirectURL); + switch (redirectURL) { case 'home': { diff --git a/src/pages/Home/components/GoToLetterBoard.tsx b/src/pages/Home/components/GoToLetterBoard.tsx index 193a3ca..e75fb81 100644 --- a/src/pages/Home/components/GoToLetterBoard.tsx +++ b/src/pages/Home/components/GoToLetterBoard.tsx @@ -6,7 +6,7 @@ const GoToLetterBoard = () => { return (
-

게시판

+

게시판

{ const [isWriter, setIsWriter] = useState(false); const [postDetail, setPostDetail] = useState(); const [activeReportModal, setActiveReportModal] = useState(false); + // const location = useLocation(); + // const sharePostId: string = location.pathname.split('/')[3]; + // const isShareLetterPreview = location.state?.isShareLetterPreview || false; const { id } = useParams(); const myZipCode = useAuthStore.getState().zipCode; diff --git a/src/pages/RollingPaper/index.tsx b/src/pages/RollingPaper/index.tsx index 9f829d6..7fc638f 100644 --- a/src/pages/RollingPaper/index.tsx +++ b/src/pages/RollingPaper/index.tsx @@ -133,6 +133,7 @@ const RollingPaperPage = () => { + );