File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 3838 - name : Install dependencies
3939 run : npm ci
4040 - name : Build
41+ env :
42+ GITHUB : " yes"
4143 run : npm run build
4244 - name : Setup Pages
4345 uses : actions/configure-pages@v5
Original file line number Diff line number Diff line change @@ -2,10 +2,22 @@ import { defineConfig } from "vite";
22import react from "@vitejs/plugin-react-swc" ;
33import path from "node:path" ;
44
5+ declare global {
6+ interface ImportMeta {
7+ env : {
8+ GITHUB : string ;
9+ }
10+ }
11+ }
512// https://vitejs.dev/config/
6- export default defineConfig ( env => {
7- const base = env . mode === "PRODUCTION" ? "/SkapEdit/" : "/" ;
13+ export default defineConfig ( ( ) => {
14+ console . log ( "GITHUB:" , import . meta. env ?. GITHUB ) ;
15+
16+ const base = import . meta. env ?. GITHUB !== undefined
17+ ? "/SkapEdit/"
18+ : "/" ;
819 console . log ( "Base:" , base ) ;
20+
921 return {
1022 plugins : [ react ( ) ] ,
1123 base,
You can’t perform that action at this time.
0 commit comments