diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 002e4576..0ad080bd 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,7 +5,6 @@ To set up the project GitHub-Stats-Extended locally, run the following commands: ```bash -./vercel-preparation.sh pnpm install pnpm run build:packages pnpm run dev:frontend diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63eedac3..2ca6ea81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,11 +33,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run vercel-preparation.sh - run: | - chmod +x ./vercel-preparation.sh - ./vercel-preparation.sh - - name: Install Dependencies uses: ./.github/actions/install-dependencies with: diff --git a/apps/backend/vercel.json b/apps/backend/vercel.json index 34a769a4..af0b1da5 100644 --- a/apps/backend/vercel.json +++ b/apps/backend/vercel.json @@ -6,11 +6,5 @@ "source": "/", "destination": "https://github.com/stats-organization/github-stats-extended" } - ], - "rewrites": [ - { - "source": "/frontend/:match*", - "destination": "https://gse-frontend-preview.vercel.app/:match*" - } ] } diff --git a/apps/frontend/src/constants.ts b/apps/frontend/src/constants.ts index b54412f7..8cc8f68c 100644 --- a/apps/frontend/src/constants.ts +++ b/apps/frontend/src/constants.ts @@ -1,12 +1,8 @@ -const PROD = false as boolean; - export const USE_LOGGER = true as boolean; export const CLIENT_ID = "Ov23lilAc5biyyRY0K1u"; -export const HOST = PROD - ? "github-stats-extended.vercel.app" - : "github-stats-extended-preview.vercel.app"; +export const HOST = window.location.host; const REDIRECT_URI = `https://${HOST}/frontend`; diff --git a/apps/frontend/src/pages/Home/Home.tsx b/apps/frontend/src/pages/Home/Home.tsx index a7b0b665..0372aac3 100644 --- a/apps/frontend/src/pages/Home/Home.tsx +++ b/apps/frontend/src/pages/Home/Home.tsx @@ -2,7 +2,7 @@ import axios from "axios"; import { useEffect, useMemo, useRef, useState } from "react"; import type { JSX } from "react"; import { useDispatch } from "react-redux"; -import BounceLoader from "react-spinners/BounceLoader"; +import { BounceLoader } from "react-spinners"; import { v4 as uuidv4 } from "uuid"; import { authenticate } from "../../api/user"; diff --git a/vercel-preparation.sh b/vercel-preparation.sh index 29b82d84..410356e2 100755 --- a/vercel-preparation.sh +++ b/vercel-preparation.sh @@ -12,4 +12,8 @@ cp -RP apps/backend/. apps/backend-copy/ # `shopt` includes dot-files in the `mv` operation (shopt -s dotglob && mv apps/backend-copy/* apps/backend/.vercel/output/functions/api.func/) cp -RP apps/backend/.vercel/output/functions/api.func/_dot_vercel_copy/output apps/backend/.vercel/ -rm -rf apps/backend/node_modules +rm -rf apps/deployment +pnpm install +pnpm build:frontend +mkdir -p apps/backend/.vercel/output/static/frontend/ +cp -RP apps/frontend/build/. apps/backend/.vercel/output/static/frontend/