From c5add2c8871346fe3e8f4daba8d903cef741178e Mon Sep 17 00:00:00 2001 From: Ruben Gees Date: Mon, 8 Jan 2024 00:11:27 +0100 Subject: [PATCH] Set base url for pages deployment --- .github/workflows/ci.yaml | 2 ++ vite.config.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6a0c238..5840c5f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,6 +24,8 @@ jobs: - run: pnpm verify - if: github.ref == 'refs/heads/main' run: pnpm build + env: + BASE_URL: /tech-radar - if: github.ref == 'refs/heads/main' name: Upload page uses: actions/upload-pages-artifact@v3 diff --git a/vite.config.ts b/vite.config.ts index 926bbb2..7f3de42 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,6 +3,7 @@ import legacy from "@vitejs/plugin-legacy" import { defineConfig } from "vite" export default defineConfig({ + base: process.env.BASE_URL || "", plugins: [ legacy({ targets: ["defaults", "not IE 11"],