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

Incompatible with GitHub github.io convention #22

Closed
aidanheerdegen opened this issue Oct 21, 2022 · 2 comments
Closed

Incompatible with GitHub github.io convention #22

aidanheerdegen opened this issue Oct 21, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@aidanheerdegen
Copy link

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 get

Screen Shot 2022-10-21 at 2 38 38 pm

as 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 case pagesurl should just be the .

@aidanheerdegen
Copy link
Author

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.

@rossjrw
Copy link
Owner

rossjrw commented Oct 21, 2022

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.

@rossjrw rossjrw closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants