Skip to content
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

Incorrect path handling when deploying from docs dir #59

Open
arturmkr opened this issue Oct 23, 2024 · 0 comments
Open

Incorrect path handling when deploying from docs dir #59

arturmkr opened this issue Oct 23, 2024 · 0 comments

Comments

@arturmkr
Copy link

In GitHub Pages, the default deployment takes place from the root directory of the main branch, but it's also possible to specify the docs directory for deployment:
image

However, this creates an issue with paths. When deploying from docs, the generated URLs for files like index.html still reference the root directory rather than accounting for the docs folder. For example, instead of the file being accessible via http://example.com/docs/index.html, GitHub Pages expects it at http://example.com/index.html, even though it's located in the docs folder.

This mismatch breaks the paths. It would be useful if this GitHub Action could allow specifying a prefix to adjust for this, so that the URLs reflect the actual directory structure or ignore the docs prefix when serving files. Ideally, adding support for such prefixes could help resolve this issue and make future deployments smoother. Or it might be better to use relative paths instead of absolute paths in GitHub Pages to avoid issues like this in the future.

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

No branches or pull requests

1 participant