Closed aidanheerdegen closed 1 year ago
I should have said, love the plugin! Previews are a fantastic feature, alleviating the necessity for everyone to install all the infrastructure to build a website. Thanks.
Hi @aidanheerdegen, thanks for the report. This should be fixed as of #11 (https://github.com/rossjrw/pr-preview-action/releases/tag/v1.2.0). Closing this issue, but please re-open if there are any problems.
It seems that
pr-preview-action
is incompatible with the GitHub convention of naming the repository <org/user>.github.io where GitHub serves the pages with the website root at the origin of the site from the repo, rather than adding the repo name as the first path in the URL.In particular this line
https://github.com/rossjrw/pr-preview-action/blob/main/action.yml#L63
just inserts
github.io
between the organisation name and the repo name. So I getas the preview URL. Everything else works fine, and I can edit the url so it is correct, but clearly in this case the logic is incorrect. I'm half convinced I must be missing something, because this is a long standing convention which I was sure the tool should understand.
I'm guessing some simple logic of checking if the repo name is already ends with.
<org/user>.github.io
might be sufficient, in which casepagesurl
should just be the