8000 Add argument for custom domain by dan-hanlon · Pull Request #24 · rossjrw/pr-preview-action · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add argument for custom domain #24

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

Merged
merged 5 commits into from
Feb 9, 2023
Merged

Add argument for custom domain #24

merged 5 commits into from
Feb 9, 2023

Conversation

dan-hanlon
Copy link
Contributor
@dan-hanlon dan-hanlon commented Nov 16, 2022

I saw this was an issue for others as well (#12) so thought I'd look at trying to implement it.

This seems like it should work for me but I'm not an expert on Github Actions. It adds an optional argument for a custom URL, if the argument is empty it should be ignored, if it is set it should overwrite the pages URL.

I haven't tested it comprehensively yet but wanted to get feedback on if this is the right direction.

@dan-hanlon dan-hanlon changed the title Add argument for custom URL Add argument for custom domain Nov 16, 2022
@rossjrw rossjrw added the enhancement New feature or request label Nov 18, 2022
@dan-hanlon
Copy link
Contributor Author

Had a chance to look at this again. I've inverted the URL setting so custom url always takes priority if it's set.
My empty string check was wrong but I've fixed that, tested on our repo, and it works.

@rossjrw
Copy link
Owner
rossjrw commented Nov 22, 2022

Thanks @dan-hanlon, I appreciate your effort! I'll take a thorough look at this when I get the chance.

Copy link
@davidmyersdev davidmyersdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rossjrw. I'm just doing a passing review, as I would also love to use this feature.

The implementation in this PR definitely looks like it would solve my use case. I love the idea of automatically checking the CNAME file in the repo, but I also don't mind having to specify the domain in the workflow if that means we can get it sooner.

@rossjrw
Copy link
Owner
rossjrw commented Feb 9, 2023

Thanks @voracious, appreciate your input.

Agreed, this does look solid. I've added a spot of documentation. Let me know how this works for you @voracious @dan-hanlon?

@rossjrw rossjrw merged commit 9dac5c4 into rossjrw:main Feb 9, 2023
@davidmyersdev
Copy link

Hey @rossjrw. I'm trying to verify this, but my workflow isn't picking up v1.3.0 for some reason. Has the latest version been published?

@davidmyersdev
Copy link

To follow up, it looks like it works correctly when explicitly setting the version to v1.3.0 but not when setting it to v1.

@rossjrw
Copy link
Owner
rossjrw commented Feb 15, 2023

Agh! Silly me - I pushed v1.3.0 but forgot to update v1 (and add v1.3). I'll get onto that...

@davidmyersdev
Copy link

Ah, that explains it. Thanks so much for releasing this. It's been working well for the past week.

electrofelix added a commit to electrofelix/pr-preview-action that referenced this pull request Apr 22, 2023
When the repository matches the org name, which might be slightly more
common for small OSS projects where the owner wishes to move to using an
org to allow it be managed by other contributors over time, the existing
code will assume this means it is for the org level pages.

Consequently updates to a repo such as vagrant-libvirt/vagrant-libvirt
will have it's preview URL using the org style rather than the
repository style.

This change adjust the matching to limit to only allowing repos of the
name `<org>.github.io` to be presented with the org style gh-pages
preview URL.

Fixes: rossjrw#39
rossjrw added a commit that referenced this pull request Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0