diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index eb74327..604e578 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,6 +29,9 @@ jobs: with: node-version: 20 + - name: Setup env variable + run: export BASE_PATH="/${{ github.repository_name }}/" + - name: Install Yarn run: npm install -g yarn diff --git a/vite.config.js b/vite.config.js index 495c5dc..1ff9868 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,7 +3,7 @@ import { nodePolyfills } from "vite-plugin-node-polyfills" import path from "path" export default defineConfig({ - base: "/cli-prototype/", + base: process.env.BASE_PATH || '/', plugins: [ nodePolyfills({ include: ["path", "process"],