Automating Jekyll/Github Pages builds based on time [closed]

独自空忆成欢 提交于 2019-12-13 06:46:06

问题


I am working on a project where I list only posts with current date(today). It would be great to have Github(or some other tool) rebuild the site every day at midnight 00:00.

Can anyone please tell me how this can be done via Github or any other tools? Travis CI maybe? Any tutorials or examples would be much appreciated as i am very new to this.


回答1:


Have a master branch and a gh-pages branch in a Github repo to use Github pages,

Then create a Travis Cron Job to execute the deployment script on a daily basis.(as suggested by @Gorille) so it

  • takes the content of the master branch and generate the site with jekyll build command
  • push the generated site to the gh-pages branch.



回答2:


You may use travis cron job : https://docs.travis-ci.com/user/cron-jobs/

This way you can rebuild your site daily. Please beware that you cannot precisely control the hour. I of course assume that you know how to build the site.



来源:https://stackoverflow.com/questions/42335256/automating-jekyll-github-pages-builds-based-on-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!