ci(website): add change detection to skip unconditional hourly deploys #515

Merged
guettlibot merged 3 commits from issue-494-website-change-detection into main 2026-06-07 03:04:59 +00:00
guettlibot commented 2026-06-07 00:28:57 +00:00 (Migrated from codeberg.org)

Summary

  • Adds a check-changes job to website.yml that detects whether any website-relevant files changed since the last successful deploy, before running the expensive build.
  • On schedule (cron), queries the Forgejo API for the last successful website.yml run, compares head_sha to HEAD, then diffs for website/**, scripts/website-verify.sh, or .forgejo/workflows/website.yml paths.
  • On push or workflow_dispatch, always deploys (same behaviour as before).
  • The existing deploy job is unchanged in content; it now runs conditionally on needs.check-changes.outputs.has_changes == 'true'.

Modelled directly after the check-changes job already in deploy.yml.

Test plan

  • Verify that a cron run with no website changes shows has_changes=false and skips the deploy job
  • Verify that a cron run after a website commit shows has_changes=true and runs the deploy job
  • Verify that a manual workflow_dispatch always runs the deploy job
  • Verify that a push to website/** still runs the deploy job

Closes #494

🤖 Generated with Claude Code

## Summary - Adds a `check-changes` job to `website.yml` that detects whether any website-relevant files changed since the last successful deploy, before running the expensive build. - On `schedule` (cron), queries the Forgejo API for the last successful `website.yml` run, compares `head_sha` to `HEAD`, then diffs for `website/**`, `scripts/website-verify.sh`, or `.forgejo/workflows/website.yml` paths. - On `push` or `workflow_dispatch`, always deploys (same behaviour as before). - The existing `deploy` job is unchanged in content; it now runs conditionally on `needs.check-changes.outputs.has_changes == 'true'`. Modelled directly after the `check-changes` job already in `deploy.yml`. ## Test plan - [ ] Verify that a cron run with no website changes shows `has_changes=false` and skips the deploy job - [ ] Verify that a cron run after a website commit shows `has_changes=true` and runs the deploy job - [ ] Verify that a manual `workflow_dispatch` always runs the deploy job - [ ] Verify that a `push` to `website/**` still runs the deploy job Closes #494 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.