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

Use custom domain for preview #12

Closed FarisZR closed 7 months ago

FarisZR commented 2 years ago

First, thanks for the Awesome Project!

I have a repo that uses a custom URL, but the actions still uses the normal GitHub Pages URL. It would be great if there is a way to set a custom URL for the action to use, that would also help if someone is using this on another page host.

MSevey commented 1 year ago

Any update on this? My team also is using a custom domain and would like this feature so that the previews load.

rossjrw commented 1 year ago

@MSevey None yet, but thanks for the interest. I plan to get around to this eventually, but in the meantime I'd be happy to review a PR if you can find time to contribute.

leog commented 1 year ago

Bumped into this too. Awesome job on the action @rossjrw, super useful! I think the best approach would be to detect if the repository has a CNAME file and use its content as pagesurl. Unfortunately I'm not into Ruby so it might take me a while to implement it.

vincerubinetti commented 1 year ago

Maybe you can use this directly or as a reference: https://github.com/actions/configure-pages

It looks pretty involved just to get the baseurl :/

What if you allowed this action to take a baseurl parameter, then you could run the actions/configure-pages before it and use its "calculated" baseurl output.

Sidenote, I really think umbrella-dir should be called preview-dir.

rossjrw commented 7 months ago

Housekeeping: Looks like this was resolved in v1.3.0 (#24) with the addition of the custom-url parameter, so I'm closing this issue - please reopen if this isn't the case