Skip to content

Sub directory handling for deployment #707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Flemmli97
Copy link
Contributor

@Flemmli97 Flemmli97 commented Mar 3, 2025

Currently when deploying the app it assumes to always be at the root directory. This makes it e.g. impossible to deploy via github pages when its not a standard pages repo (the one with <user>.github.io) as the page will be deployed at <user>.github.io/<project>.

This makes it so the deployment directory is configurable via an environment variable sub_directory that allows changing it. The github action is also adjusted so if its not in a <user>.github.io repo it will update the env var.

If course this PR won't really benefit the main repo but since i needed this i thought i can share this in case someone else needs it.

Copy link

vercel bot commented Mar 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
misode ✅ Ready (Inspect) Visit Preview Mar 3, 2025 0:36am

@misode
Copy link
Owner

misode commented Mar 3, 2025

This looks way over complicated. Vite should be able to handle this by itself when you configure base or --base

@Flemmli97
Copy link
Contributor Author

just changing base wont work as all routes and assets still look for root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants