From 61b1968d54870b5fb69897f8d4922ec14e003aa2 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sat, 5 Oct 2024 00:21:46 +0200 Subject: [PATCH] ci: set base url --- .github/workflows/deploy.yaml | 2 +- vite.config.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 355e19f..8f10374 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -32,7 +32,7 @@ jobs: run: npm ci - name: Build env: - SERVICE_URL: ${{ vars.SERVICE_URL }} + BASE_URL: /${{ github.repository }}/ run: | npm run build cp -r static dist diff --git a/vite.config.ts b/vite.config.ts index e99a795..2055249 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,6 +8,7 @@ const { maptilerAPIKey } = fromEnv({ export default defineConfig({ plugins: [solid()], + base: process.env.BASE_URL ?? '/', define: { MAPTILER_API_KEY: JSON.stringify(maptilerAPIKey), },