File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Build static assets and publish to GitHub Pages (Settings → Pages → Source: GitHub Actions).
22#
3+ # If the live site shows a blank page, check View Source: if you see src="/src/main.tsx", GitHub Pages
4+ # is still publishing the repo root (branch deploy) instead of this workflow's dist/ — switch Source
5+ # to "GitHub Actions" below and redeploy.
6+ #
37# Required repository configuration:
48# 1) Settings → Pages → Build and deployment: Source = "GitHub Actions"
59# 2) Settings → Secrets and variables → Actions → add secret:
5054 # Vite may omit dotfiles from public/; Jekyll ignores are not used for Actions Pages, but this is harmless.
5155 touch dist/.nojekyll
5256
57+ - name : Verify dist is a production bundle (not repo-root index.html)
58+ run : |
59+ if grep -qE 'src="/src/main\.tsx"' dist/index.html; then
60+ echo "::error::dist/index.html still points at Vite dev entry — build output is wrong."
61+ exit 1
62+ fi
63+ if ! grep -qE '/assets/[^"]+\.js' dist/index.html; then
64+ echo "::error::dist/index.html has no hashed /assets/*.js script — not a Vite build."
65+ exit 1
66+ fi
67+
5368 - uses : actions/configure-pages@v5
5469
5570 - uses : actions/upload-pages-artifact@v3
You can’t perform that action at this time.
0 commit comments