rossjrw / pr-preview-action

GitHub Action that deploys a pull request preview to GitHub Pages, similar to Vercel and Netlify, and cleans up after itself.
https://github.com/marketplace/actions/deploy-pr-preview
MIT License
267 stars 43 forks source link

Add argument for custom domain #24

Closed dan-hanlon closed 1 year ago

dan-hanlon commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

rossjrw commented 1 year ago

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?

davidmyersdev commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

davidmyersdev commented 1 year ago

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