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
255 stars 39 forks source link

Use official `actions/jekyll-build-pages` #31

Closed fregante closed 1 year ago

fregante commented 1 year ago

GitHub Pages natively support Jekyll, it's what lets you publish index.md and have it show up a rendered index.html for example.

Instead of that custom action, this action can use the official https://github.com/actions/jekyll-build-pages

rossjrw commented 1 year ago

Sorry, what exactly are you suggesting here?

fregante commented 1 year ago

It's in the last sentence: use that action internally to build the Jekyll site.

From what I understand, "pr-preview-action" can be used to preview PRs for GitHub Pages websites. GitHub Pages is not just static HTML but it's actually Jekyll-based.

If my repo contains "readme.md" and I enable GitHub Pages publishing, the markdown file is built and displayed as index.html. If I add your action to said repo, will the preview also build it? I don't see any references to Jekyll at this point, so the only way to make that happen would be to use GitHub's action.

fregante commented 1 year ago

But… now that I think about it… the build part doesn't actually need to be part of this action probably. The action will still publish the files to GitHub Pages and then GitHub will take care of the Jekyll build.

Closing 😅

rossjrw commented 1 year ago

Thanks for clarifying. That's actually a good point and it's not one that I'd thought about. I don't see any reason that GH running Jekyll on the output preview directory wouldn't work out of the box, but it's definitely something to check.