From 9bd31c4c7e81139a6dc61589e98c0fd3acd8bd92 Mon Sep 17 00:00:00 2001 From: brecert Date: Fri, 10 Sep 2021 18:03:06 -0400 Subject: [PATCH] Use base url for building actions --- .github/workflows/preview_pull_request.yml | 2 +- src/context/index.tsx | 2 +- src/env.d.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview_pull_request.yml b/.github/workflows/preview_pull_request.yml index d01061b5..3f7d4019 100644 --- a/.github/workflows/preview_pull_request.yml +++ b/.github/workflows/preview_pull_request.yml @@ -27,7 +27,7 @@ jobs: # - run: yarn check - name: build - run: yarn build + run: yarn build --base "/revite/${{ github.ref }}/" - name: publish preview uses: JamesIves/github-pages-deploy-action@4.1.5 diff --git a/src/context/index.tsx b/src/context/index.tsx index 60f3694c..0abdbdb8 100644 --- a/src/context/index.tsx +++ b/src/context/index.tsx @@ -11,7 +11,7 @@ import Client from "./revoltjs/RevoltClient"; export default function Context({ children }: { children: Children }) { return ( - + diff --git a/src/env.d.ts b/src/env.d.ts index bcd82398..3cbd1274 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,6 +1,7 @@ interface ImportMetaEnv { VITE_API_URL: string; VITE_THEMES_URL: string; + BASE_URL: string; } interface ImportMeta {