Add a cron to rebuild the site
GaelVaroquaux opened this issue · 6 comments
GaelVaroquaux commented
We should have a cron (do github action do that?) to rebuild the site daily. I think that John Hopkins releases new data approximately at the same hour. We should do it after. If not, something around 4pm NY times seems reasonable.
punchagan commented
It seems like the uploads are triggered at midnight GMT, based on the commits. Followed by some clean ups, which seem to be made manually. May be an hour after that? Or midnight NY time?
GaelVaroquaux commented
May be an hour after that?
Sound right! Unless you think that the manual updates sometimes come
later.
punchagan commented
It does seem like manual updates come a little later, on some days. It depends on the data each day, I guess.
GaelVaroquaux commented
It does seem like manual updates come a little later, on some days.
The big challenge of the updates is that sometimes the names of the
countries changes. It makes our cross-merging with other sources very
fragile. Are the manual updates related to country names?
glemaitre commented
I see 2 solutions here:
- a simple one by adding the following to the
deploy.yml
:
on:
push:
branches:
- master
schedule:
- '0 1 * * *' # run at during the 1st hour of each day
- to periodically check if there is a change in the data repository upstream. A viable solution is to store the commit hash in our repo and compare it. The following SO thread explains how to do that.
GaelVaroquaux commented
Thanks @glemaitre ! I propose that we start with the first, simple, one, and work later on the better one.