Skip to content

Commit 5a16910

Browse files
hackall360claude
andcommitted
Fix: Set correct base path for /development/ deployment
The /development/ deployment was returning 404 because the site was built with root paths instead of /development/ paths. Changes: - Update vite.config.js to use VITE_BASE_PATH environment variable - Set VITE_BASE_PATH in GitHub Actions based on branch: - develop branch: '/development/' - main branch: '/' - This ensures all asset paths are correct for subdirectory deployment Fixes the page not found error on www.unityailab.com/development/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9074e74 commit 5a16910

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ jobs:
5151
5252
- name: Build with Vite
5353
id: build_check
54+
env:
55+
VITE_BASE_PATH: ${{ github.ref_name == 'develop' && '/development/' || '/' }}
5456
run: |
5557
echo "🏗️ Building with Vite..."
58+
echo "📍 Base path: $VITE_BASE_PATH"
59+
echo "🌿 Branch: ${{ github.ref_name }}"
5660
npm run build
5761
5862
# Check if build succeeded

vite.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ export default defineConfig({
99
// targets: []
1010
// })
1111
],
12-
// Base public path
13-
base: './',
12+
// Base public path - set via environment variable for branch-specific deployments
13+
// Main branch: '/' (root), Develop branch: '/development/'
14+
base: process.env.VITE_BASE_PATH || '/',
1415

1516
// Build configuration
1617
build: {

0 commit comments

Comments
 (0)