mirror of
https://github.com/samvallad33/vestige.git
synced 2026-07-02 22:01:01 +02:00
fix(pages): serve dashboard at site root, drop double /vestige nesting
The Pages project site is already served from /vestige/, and the dashboard is built with base path /vestige. Nesting the build under _site/vestige/ served it at /vestige/vestige/ and left a broken redirect at the root. Copy the build to the artifact root so it serves correctly at /vestige/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2359472588
commit
a19ea11276
1 changed files with 6 additions and 20 deletions
26
.github/workflows/pages.yml
vendored
26
.github/workflows/pages.yml
vendored
|
|
@ -49,27 +49,13 @@ jobs:
|
|||
|
||||
- name: Assemble site root
|
||||
run: |
|
||||
# The Pages project site is already served from /vestige/, and the
|
||||
# dashboard is built with base path /vestige (VESTIGE_BASE_PATH), so
|
||||
# its files go directly at the artifact root — the base path already
|
||||
# accounts for the subpath. No extra subdirectory or redirect needed.
|
||||
rm -rf _site
|
||||
mkdir -p _site/vestige
|
||||
# Publish the dashboard under /vestige/ (matches VESTIGE_BASE_PATH).
|
||||
cp -r apps/dashboard/build/* _site/vestige/
|
||||
# Root-level redirect so visitors hitting the bare Pages URL land
|
||||
# on the dashboard instead of a 404.
|
||||
cat > _site/index.html <<'HTML'
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="refresh" content="0; url=./vestige/" />
|
||||
<link rel="canonical" href="./vestige/" />
|
||||
<title>Vestige</title>
|
||||
<script>location.replace('./vestige/' + location.search + location.hash);</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="./vestige/">the Vestige dashboard</a>…</p>
|
||||
</body>
|
||||
</html>
|
||||
HTML
|
||||
mkdir -p _site
|
||||
cp -r apps/dashboard/build/* _site/
|
||||
|
||||
- uses: actions/configure-pages@v5
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue