From ddea63386026df9bc74e0adb14c2b39ea6097c89 Mon Sep 17 00:00:00 2001 From: abrichr Date: Mon, 27 Jul 2026 01:59:59 -0400 Subject: [PATCH] ci: eliminate duplicate docs builds --- .github/workflows/ci.yml | 6 +++++ .github/workflows/trigger.yml | 44 ----------------------------------- README.md | 6 ++--- 3 files changed, 9 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/trigger.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6a827f..eba86ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,12 @@ on: push: branches: - main + # A docs-source push is independently validated by sync.yml immediately + # before deployment. Avoid installing, testing, and building it twice. + paths-ignore: + - 'docs/**' + - 'mkdocs.yml' + - '.github/workflows/sync.yml' permissions: contents: read diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml deleted file mode 100644 index ba72cec..0000000 --- a/.github/workflows/trigger.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Template: copy this to each sub-repo as .github/workflows/notify-docs.yml -# Requires DOCS_DISPATCH_TOKEN secret (fine-grained PAT with repo scope on openadapt-ops) -# -# This template lives in EACH content sub-repo so that a change to that repo's -# README/changelog rebuilds docs.openadapt.ai (cross-repo content sync). The -# docs repo (openadapt-ops) publishes its OWN docs changes directly via the -# push trigger in sync.yml and does not need this template. - -name: Notify docs -on: - push: - branches: [main] - -jobs: - notify: - runs-on: ubuntu-latest - steps: - # Dispatch a repository_dispatch event to openadapt-ops so it - # rebuilds and deploys docs.openadapt.ai. We POST directly to the GitHub - # API with curl (no third-party action) and retry on transient failures - # such as the intermittent "Request body length does not match - # content-length header" error that previously silently dropped the - # dispatch. curl --fail makes any non-2xx HTTP status a retryable error; - # a non-zero exit after all retries fails the job (loud, red). - - name: Dispatch repo-updated to openadapt-ops - env: - DOCS_DISPATCH_TOKEN: ${{ secrets.DOCS_DISPATCH_TOKEN }} - REPO: ${{ github.repository }} - SHA: ${{ github.sha }} - run: | - curl --fail --show-error --silent \ - --retry 5 --retry-all-errors --retry-delay 5 \ - -X POST \ - -H "Authorization: Bearer ${DOCS_DISPATCH_TOKEN}" \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/OpenAdaptAI/openadapt-ops/dispatches \ - -d "{\"event_type\":\"repo-updated\",\"client_payload\":{\"repo\":\"${REPO}\",\"sha\":\"${SHA}\"}}" - - - name: Report dispatch failure - if: failure() - run: | - echo "::error::docs dispatch failed - docs did NOT deploy. The repository_dispatch to OpenAdaptAI/openadapt-ops (event-type repo-updated) did not fire after retries; docs.openadapt.ai will not rebuild for this push." - exit 1 diff --git a/README.md b/README.md index a5143bc..c0f1232 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,9 @@ uv run pytest tests/ -q served at `docs.openadapt.ai`. It runs when: - a push to `main` touches `docs/**`, `mkdocs.yml`, or the workflow itself, which builds and deploys this repository's docs as-is; - - a sub-repository dispatches a `repo-updated` event (see - [`.github/workflows/trigger.yml`](.github/workflows/trigger.yml)) so its - README and changelog pages re-sync here; + - a sub-repository's `notify-docs.yml` workflow dispatches a `repo-updated` + event after its public README, changelog, or release changes, so those + pages re-sync here; - the weekly schedule or a manual run performs a full cross-repo rebuild. Every path validates and builds in strict mode before deploying, so a failing