Run at the right moments
Running everything on every push wastes minutes and money. Filters say exactly when: only pushes to main, every pull request into main, skip docs-only changes, plus a Run button and a nightly schedule.
Filtering events
name: CI
on:
push:
branches: [main]
paths-ignore:
- "docs/**"
- "**.md"
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
jobs:
check:
runs-on: ubuntu-latest
steps:
- run: echo "event=${{ github.event_name }} ref=${{ github.ref }}"