0

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.

ntnlbd
  • 123
  • 4
  • There is https://jekyllontime.top/, which is meant to solve this problem. Disclaimer: I am the owner + it is in a very early stage. – Anna Markee Jun 23 '19 at 21:25

2 Answers2

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.
marcanuy
  • 23,118
  • 9
  • 64
  • 113
  • This works, need to figure a couple of things out with travis built and deploy but overall seems to work fine. Thank you! – ntnlbd Feb 21 '17 at 01:02
  • I am using something similar, without the cronjobs, just launching a deploy script everytime I commit to github, it should be straightforward to do it https://github.com/marcanuy/simpleit.rocks/blob/master/deploy.sh – marcanuy Feb 21 '17 at 12:21
-1

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.

Gorille
  • 170
  • 12