Skip to content

Scheduled observation #39

Scheduled observation

Scheduled observation #39

Workflow file for this run

name: Scheduled observation
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
inputs:
pages:
description: "Space-separated page titles"
required: true
default: "Bitcoin COVID-19"
jobs:
observe:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.14"
- name: Build CLI from source
run: bun install --frozen-lockfile && bun run build
- name: Run refract analysis
run: |
PAGES="${{ github.event.inputs.pages || 'Bitcoin' }}"
for PAGE in $PAGES; do
echo "=== Observing: $PAGE ==="
node packages/cli/dist/src/cli.js analyze "$PAGE" --depth detailed --json \
> "observations/${PAGE//\//_}.json" 2>&1
done
- name: Commit observations
run: |
git config user.name "refract-bot"
git config user.email "bot@refract-org.github.io"
git add observations/
git diff --quiet && echo "No changes" || {
git commit -m "chore: daily observation $(date -u +%Y-%m-%d)"
git push
}