jhelvy/distillery

automatically update list of sites

Closed this issue · 8 comments

Hi, I'm just wondering if it would be relevant to automatically refresh the list of sites in the showcase part. This would have two purposes:

  • update the screenshot of the website, so that it corresponds to the current look of the website and not the look it had when it was added to the list;
  • check if URLs are valid and remove websites whose URL doesn't work anymore (for example because one wants to change the domain name).

Since these two cases don't happen very often, maybe use github actions to refresh this list once per month?

Interesting idea - right now I've already set up two actions that re-build the site and the main README on every commit, so it's getting updated pretty often. But the code does not have checks for whether the URLs are valid, and it doesn't update the images. Instead it looks for whether an image already exists, and it only takes new ones if a new site was added. I didn't want to have to retake all the screenshots every time I locally built the site (e.g. while testing on my computer). But that could be modified by adding an argument like update_all to update_screenshots() that defaults to FALSE but can be set to TRUE in a github action. Then you could set up that action to run weekly / monthly.

The URL checks is something we could add to the clean_sites() function to filter out any sites that don't have a valid URL.

Fixed in PR #34

Yikes, just found out that github actions was trying to build the site for the past 6 hours and failed. It froze up when trying to re-take all the screen shots. Any ideas on what's gone wrong? Can you see the build logs?

ah shoot, sorry about that, I'll check the logs

I don't understand why it was stuck, I re-run the action on my fork with the exact same repo and it works. I made a PR because the triggers were not good but I don't think this was the cause of the freeze. Could you try to re-run the action?

Not sure either, looks in the log like it just got stuck trying to take one of the screenshots. Could be that the screen shot was having a hard time loading the page to take the shot? I guess we'll learn soon if the build works or not.

Yeah, do you want to wait a week until 1st of april to check if it works or see it now?

If it ran on your fork then let's just let it be and see what happens next week.