helaili / jekyll-action

A GitHub Action to publish Jekyll based content as a GitHub Pages site
MIT License
250 stars 120 forks source link

Include documentation for first set up with no gh-pages repo #129

Closed MolotovCherry closed 2 years ago

MolotovCherry commented 2 years ago

The description can be a little confusing at times, but an example would be easy and clear. Tell first users to create an empty branch, commit it, then upload it

git switch --orphan gh-pages
git commit --allow-empty -m "Initial commit on orphan branch"
git push -u origin gh-pages

Then go to https://github.com/<user>/<user>.github.io/settings/pages and set gh-pages as the source.

It's a bit clearer and direct this way.

Spenhouet commented 2 years ago

Setting source to gh-pages made every work for me (https://github.com/helaili/jekyll-action/issues/134) and it makes sense in that the GitHub action builds the Jekyll page and the GitHub deployment then deploys it. But this is not really how I understood how this GitHub action is supposed to work.

The official Jekyll guide literally says:

Note that you do not need to setup a gh-pages branch or enable GitHub Pages, as the action will take care of this for you.

And the README here says:

Upon successful execution, the GitHub Pages publishing will happen automatically and will be listed on the environment tab of your repository.

As well as that there is a build_only option which reads:

When set to true, the Jekyll site will be built but not published

As it stands, this GitHub action does not seem to do any publishing what so ever. Contrary to all the documentation.

helaili commented 2 years ago

Fixed with https://github.com/helaili/jekyll-action/commit/00df63cfdf3d50ae4856a483dc6f1eef95157b9b