New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build docs site with GitHub Actions #8201
Conversation
This comment has been minimized.
This comment has been minimized.
This workflow is heavy. It would be abstracted in a simple workflow like this one: https://github.com/BryanSchuetz/jekyll-deploy-gh-pages#example As recommended by DirtyF in another thread github/pages-gem#651 (comment) Or see this approach which is what the Jekyll docs recommend. https://jekyllrb.com/docs/continuous-integration/github-actions/#setting-up-the-action I added the article by the way and my demo listed at the end works now using |
Oh I see in the original PR
What specific control is needed that can't be done with the third party ones and options or additional build steps? |
Third-party services are always tailored for the generic userbase. Having a completely in-house procedure for something as simple as setting up a shell script and a YAML config file will allow |
Thanks I am onboard with this approach then. There is more control, but at the cost of having to maintain boilerplate instead of having it maintained in a separate action (which means less control and a different kind of risk of commands going out of date). |
As of July 31, 2020, GitHub Pages still fails to deploy if the target branch contains only one commit (the root commit). By cloning the target branch before building, we can push the newly built content as a new commit on top of the existing branch, effectively bypassing this GH Pages issue. Also, this preserves the deploy history, though I'm unsure if anyone really cares.
I've got some new updates, namely issues with GitHub Pages deployment. Please kindly check the commit message of e8eb528 and the PR description, which I've updated to explain what I'm doing. |
@iBug Thanks for updating the token as suggested. The other commits and message make sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see the gem
invokations go away before this gets merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Very cool to see us use this for site building. 🎉
@jekyll: merge +docs |
This comment has been minimized.
This comment has been minimized.
iBug: Build docs site with GitHub Actions (#8201) Merge pull request 8201
jekyllbot: Update history to reflect merge of jekyll#8201 [ci skip]
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
https://jekyllrb.com is now built with current |
This is essentially a rework of #8126.
Key points and notable features:
Use
GITHUB_TOKEN
provided by GitHub Actions for authenticationGITHUB_TOKEN
Cache installation from Bundler
Gemfile
andjekyll.gemspec
from the repository root. As Jekyll is always in rapid development, I chose to always runbundle install
, regardless of whether there's a cache hit.Generate prettier commit messages. Example:
Good Bash script and Git practices, e.g.
${VAR}
instead of$VAR
)cmd "$var"
instead ofcmd $var
)git push <remote> +<refspec>
instead ofgit push -f
Note: Please add a commit to the
gh-pages
branch before merging this PR. As explained in the commit message of e8eb528, GitHub Pages currently has a bug where it won't deploy properly on branches containing only one single commit. I am working around this issue by adding commits on top of the existing branch in many of my projects, and they're all working smoothly, so I'm carrying the same technique to this PR.On a side note, previous failures from #8126 are (most likely) caused by an ongoing incident of GitHub. Specifically:
As old
GITHUB_TOKEN
s are supplied to Actions runs (they expire 60 minutes after creation),git push
failed to authenticate. This should not happen normally so it'll be settled automatically after GitHub recovers.Please feel free to share any concerns you have with my implementation. I'll be eager to answer them.