Skip to content

ci: dedupe runs, simplify pre-commit, DRY build/deploy - #58

Merged
bakerboy448 merged 1 commit into
Notifiarr:mainfrom
bakerboy448:ci/workflow-improvements
Jul 21, 2026
Merged

ci: dedupe runs, simplify pre-commit, DRY build/deploy#58
bakerboy448 merged 1 commit into
Notifiarr:mainfrom
bakerboy448:ci/workflow-improvements

Conversation

@bakerboy448

Copy link
Copy Markdown
Collaborator

Four CI improvements in one PR.

  1. No more double CI runsbuild.yml and precommit.yml triggered on both push and pull_request, so a branch push + PR ran each twice. Now pull_request: [main] only. (Fork PRs were already single-run.)
  2. Simplify precommit.yml — the repo backlog is clean, so the ~25-line "resolve change range" shell (needed only to skip legacy violations) is removed; pre-commit/action runs --all-files by default. More robust (catches regressions in untouched files).
  3. DRY build/deploy — extracted the shared build into a reusable _build.yml (workflow_call, optional upload-site). build.yml calls it for PR validation; deploy.yml calls it (uploading the site artifact) then a deploy job downloads and publishes.
  4. Remove redundant if — dropped the always-true if: github.ref == 'refs/heads/main' on the deploy step.

Deploy safety: the Pages publish is byte-for-byte preserved — checkout (git context for peaceiris) → download-artifact (the built ./site) → unchanged peaceiris/actions-gh-pages@v4 with the same cname: notifiarr.wiki, token, publish_dir, and bot identity. actionlint passes on all four files.

Note: the Build + Pre-commit jobs are exercised by this PR's CI, but the new deploy.yml artifact hand-off only runs on push to main — worth a glance at the first Pages deploy after merge.

…ify pre-commit

- Extract shared MkDocs build steps into _build.yml (workflow_call) with
  optional upload-site input; build.yml and deploy.yml call it
- Remove push: trigger from build.yml and precommit.yml to prevent duplicate
  CI runs when a branch PR is opened
- Refactor deploy.yml into build + deploy jobs so the site artifact is built
  once and passed to the peaceiris publish step
- Drop redundant `if: github.ref == 'refs/heads/main'` guard in deploy job
- Simplify precommit.yml: drop fetch-depth, Resolve-change-range step, and
  --from-ref/--to-ref extra_args; run --all-files now that the backlog is clean
- Fix SC2086 (unquoted $GITHUB_OUTPUT) caught by actionlint/shellcheck

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bakerboy448
bakerboy448 force-pushed the ci/workflow-improvements branch from adea1a3 to a345251 Compare July 21, 2026 21:58
@bakerboy448
bakerboy448 merged commit db02e5c into Notifiarr:main Jul 21, 2026
2 checks passed
@bakerboy448
bakerboy448 deleted the ci/workflow-improvements branch July 21, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant