Skip to content

fix(data/smartphone,scripts): drop duplicate honor-magic-7-pro and gu… #4

fix(data/smartphone,scripts): drop duplicate honor-magic-7-pro and gu…

fix(data/smartphone,scripts): drop duplicate honor-magic-7-pro and gu… #4

Workflow file for this run

name: refresh-data
# Static-dump refresh (PokeAPI api-data style + git-scraping pattern).
# Regenerates dump/ from the curated seed data and commits it back when it changes.
# - weekly schedule keeps the static dump fresh
# - runs on any change to data/ (e.g. a curated-data PR)
# - manual trigger for on-demand rebuilds
on:
schedule:
- cron: "17 6 * * 1" # Mondays 06:17 UTC (offset minute is polite, per git-scraping)
push:
branches: [main]
paths:
- "data/**"
- "app/**"
- "scripts/dump.py"
workflow_dispatch:
permissions:
contents: read
jobs:
dump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install
run: pip install -e .
- name: Validate seed data
run: python -m scripts.validate
# Data collection happens via a separate internal pipeline that publishes
# curated data into data/ (PR). This workflow only re-dumps it.
- name: Generate static dump
run: python -m scripts.dump
# Publish target depends on the public/private decision (docs/DATA_PIPELINE.md §5).
# Default: keep the dump as a downloadable build artifact (works for public OR private repos).
- name: Upload static dump artifact
uses: actions/upload-artifact@v4
with:
name: techapi-static-dump
path: dump/
# To serve a public static API, enable Pages and swap the step above for:
# - uses: actions/upload-pages-artifact@v3
# with: { path: dump/ }
# - uses: actions/deploy-pages@v4
# (requires `permissions: pages: write, id-token: write` and Settings → Pages → GitHub Actions)