Index.html ends up inside a folder after deploying gh-pages branch #45267
-
Select Topic AreaQuestion BodyI've managed to write a pipeline for deploying my project, however, after successfully building it into gh-pages and then deploying it from the gh-pages branch, nothing appears on the page at the address: https://www.sorkofi.github.io/github-profile-viewer/ Analysing the console and element inspection, I figured my Inside the gh-pages branch nothing seems different about the file tree, it seems like this change happens when github deploys it from there. My actions workflow: https://github.com/sorkofi/github-profile-viewer/edit/master/.github/workflows/main.yml |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I have absolutely no idea how i'd go for solving this, and if what i pointed out is the actual cause of the issue. Any ideas ? |
Beta Was this translation helpful? Give feedback.
-
The problem is that your |
Beta Was this translation helpful? Give feedback.
The problem is that your
index.html
references the other files with an absolute path, starting with a slash (/assets/...
). This tells the browser to request exactly that path from the hostname. You need to use a relative path instead, so the browser builds the path relative to the current file. E.g. ifindex.html
andassets/
are in the same directory, you need to use./assets/...
.