Skip to content

Commit d5f1c06

Browse files
fix workflow variables
1 parent c573269 commit d5f1c06

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/deploy-gh-pages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727

2828
- name: Build app
2929
run: pnpm build
30+
env:
31+
VITE_BASE_PATH: ${{ vars.VITE_BASE_PATH }}
32+
VITE_REMOTE_BASE_URL: ${{ vars.VITE_REMOTE_BASE_URL }}
3033

3134
- name: Deploy to GitHub Pages
3235
uses: peaceiris/actions-gh-pages@v4

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { VitePWA } from 'vite-plugin-pwa';
66
import { defineConfig, loadEnv } from 'vite'
77

88
export default defineConfig(({ mode }) => {
9-
console.log('mode', mode);
109
// Load env file based on `mode` in the current working directory.
1110
const env = loadEnv(mode, process.cwd(), '');
11+
console.log('mode', mode, 'VITE_BASE_PATH', env.VITE_BASE_PATH);
1212
return {
1313
base: env.VITE_BASE_PATH || '/',
1414
plugins: [

0 commit comments

Comments
 (0)