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

Update action to work with user/organization sites #11

Closed ejfrick closed 1 year ago

ejfrick commented 2 years ago

@rossjrw This action currently does not work with organization or user sites. Since the format for user/org sites is different from project sites, it will attempt to deploy to ORG_NAME.github.io/ORG_NAME.github.io/UMBRELLA_FOLDER which just redirects to ORG_NAME.github.io. I added some logic to check whether the repo belongs to an org/user site & create the pagesurl var accordingly. Otherwise it will use the current sed command to create the pagesurl var.

ejfrick commented 2 years ago

@rossjrw do you need me to make this change from not-a-fork and resubmit? Saw the CI failed.

rossjrw commented 2 years ago

@ENG-Jole thanks for your contribution - I'll take a look when I get a chance!

The CI has failed because the preview system doesn't currently support previews for forks, which I'm working on fixing (see #3) - unfortunately I've recently started a new job and haven't found much time to properly resume work on it. Your changes are probably fine; I'll just test them locally. (There's no way you could contribute changes without forking, as only I currently have write access to this repository).

ejfrick commented 2 years ago

@rossjrw no worries! Thanks for your hard work making this, absolute lifesaver 😊

Qiming-Liu commented 1 year ago

Hope this merge soon