Use this basic model:
- A workflow file (
.yml) defines automation. - Triggers like
scheduleandworkflow_dispatchdecide when it runs. - Jobs and steps run scripts, API calls, and git commits on a hosted runner.
Use this repo as your first concrete example:
- Repo: TeamTrace/butler_p_immigration_shootings
- Workflow:
/.github/workflows/dataset-butler.yml
Focus on:
workflow_dispatchfor manual runs.schedulefor recurring runs.- Python step that calls a Redivis notebook updater via API.
- Fork this repository to your own GitHub account.
- Open your fork on GitHub and confirm the
Actionstab is available.
Open:
.github/workflows/daily-ncaaw-ticket-prices.yml
Check what this workflow does:
- Pulls StubHub event HTML.
- Runs
scripts/analyze_stubhub_big10wbt.py. - Appends a timestamped row to
data/stubhub_big10wbt_session7_history.csv. - Commits sanitized classroom-safe HTML to
data/raw_public/(removing API keys from the html file) anddata/stubhub_big10wbt_session7_history.csv
Steps:
- Go to
Actions. - Select
daily-ncaaw-ticket-prices. - Click
Run workflow. - Open logs and review each step.
- Confirm output files changed in the repo.
Open:
.github/workflows/daily-wncaab-odds.yml
Check what this workflow does:
- Calls The Odds API for WNCAAB moneyline odds.
- Runs
scripts/fetch_wncaab_odds.py. - Writes raw JSON snapshots and appends CSV rows.
- Commits to this repository
- Get a key from the-odds-api.com.
- In the forked repo, go to
Settings->Secrets and variables->Actions. - Add a new repository secret named
THE_ODDS_API_KEY. - Paste only the key value.
- Go to
Actions. - Select
daily-wncaab-odds. - Click
Run workflow. - Check logs and confirm new files in
data/.
- limitations of GitHub Actions
- use cases that fit Actions
- more real-world examples