covid19-dash/covid-dashboard

Add a cron to rebuild the site

GaelVaroquaux opened this issue · 6 comments

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.

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?

It does seem like manual updates come a little later, on some days. It depends on the data each day, I guess.

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.

Thanks @glemaitre ! I propose that we start with the first, simple, one, and work later on the better one.