-
Notifications
You must be signed in to change notification settings - Fork 32
Post commit hook to run hugo automatically. #26
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
Conversation
If you install it locally, it will run Hugo as long as you modify anything in the `content` directory. If you use it within Travis, something else will have to be done if it's not deployed to GitHub, like adding API keys or say where it's going to be deployed. Addresses issue codeisscience#20. Maybe closes it, but I'm not sure.
|
Nice! I'll review after the demo call in a minute :) |
Ripping links from the codeisscience#18 comments. Addresses that issue, will be added to the PR, I guess. Also adds *~ to .gitignore 🙈
…ugo I don't understand...
|
@JJ omg, loving the best practices page!! |
|
It's just a draft... And for some reason, it wasn't generated by Hugo
locally. I might have done something wrong...
|
|
I've just enabled travis for this repo, maybe that was needed... |
|
hmmmm, I triggered a build and it failed: https://travis-ci.com/yochannah/code-is-science thoughts? |
|
Could it be failing because there's no |
|
@stain88 I think you might be right. Do you know what to change to fix this, by any chance? |
|
None whatsoever, I'm afraid. Haven't used travis before. |
|
You will probably need to install Hugo in travis. Except if you want to
deploy directly from travis to some place different from github, I don't
really think it's worth the while.
|
|
it's deploying to github and hosted on github pages - does that help? |
|
Then you don't need to do anything in Travis. Just install the hook (it's
in a comment in the script itself), and it will regenerate pages for you as
soon as you've commited the source. Then commit again for the generated
pages, and you're done.
|
|
I see! It took a while for me to understand what was happening here. Thank you! It might be nice to automatically commit and deploy the built site, though. Will continue this in #20 |
Goes to #20, don't know if this is what you had in mind. Feel free to review, add or eliminate.