Skip to the content.

Automation & GitHub Actions

馃彔 Home 路 Overview 路 Data Structure 路 Entity Matching 路 Consuming the Data 路 Automation


Who is this page for?


Weekly Schedule

This repository runs completely on automatic pilot using GitHub Actions. Every Sunday evening at 21:00 UTC (9:00 PM UK time), the scheduled job triggers automatically:

flowchart TD
    A["Sunday 21:00 UTC<br/>(GitHub Timer)"] --> B["Start GitHub Action"]
    B --> C["Fetch Recent Posts via API"]
    C --> D{"Are any posts new or modified?"}
    D -->|No| E["Done!<br/>Exits cleanly in ~5 seconds.<br/>No commits made."]
    D -->|Yes| F["Parse news stories & extract links"]
    F --> G["Match councils & library branches"]
    G --> H["Classify categories & change types"]
    H --> I["Update data/ files & commit to repo"]

Why the weekly job is considerate:


Manual Execution (Workflow Dispatch)

You can also trigger a run manually at any time directly from the GitHub website:

  1. Visit the Actions tab on GitHub: Actions Tab.
  2. Click Scrape Public Libraries News in the left sidebar.
  3. Click the Run workflow dropdown on the right:
    • Incremental mode (default): Quickly checks for the newest posts.
    • Backfill mode: Traverses backward through the archive history. You can optionally specify the number of pages (e.g. 5 or leave blank for everything).
  4. Click the green Run workflow button.

Historical Backfilling via CLI

To backfill historical posts back to 2010 locally, the scraper can be run with --mode backfill:

# Backfill the 10 most recent historical pages (500 posts)
python -m src.cli --mode backfill --pages 10

# Or run a full historical backfill
python -m src.cli --mode backfill

Safe Backfill Safeguards: