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

Can the preview be protected on private repository so that only people with access can see the preview? #27

Closed GuillaumeDesforges closed 1 year ago

GuillaumeDesforges commented 1 year ago

In one of my organization, we have internal documents built in a private repository. I would like to use this GitHub action to allow previews on PRs. However, these previews should only be accessible for people who can access this private repository.

Does this GitHub Action handle this? Thanks

rossjrw commented 1 year ago

With GitHub Enterprise Cloud you can deploy a private GitHub Pages site from a private repo: https://docs.github.com/en/enterprise-cloud@latest/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site. In this case, this Action just makes a new directory in that existing site, so it will be just as private or public as the main site.

On a standard GitHub subscription, I don't believe there's any way to change the visibility of a GitHub Pages site to anything other than public. In this case, I'd imagine that your internal documents are served by something other than GitHub Pages. You might still be able to get this Action to work for you.

If you have more details about your situation I might be able to help further, please feel free to respond. I'm going to mark this issue as close as it doesn't reflect an issue with the Action.