From d8212beff61bd7af0c919df8eefaf8a57547e6a5 Mon Sep 17 00:00:00 2001 From: kingchenc Date: Sun, 31 May 2026 21:57:42 +0200 Subject: [PATCH] ci(sync-about): retarget count sync to wickra-docs + point About at docs.wickra.org (P8.3) (#88) * ci(sync-about): auto-sync the published version to wickra-docs on release * ci(sync-about): retarget indicator-count sync from wiki to wickra-docs + point About homepage at docs.wickra.org (P8.3) --- .github/workflows/sync-about.yml | 48 +++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/.github/workflows/sync-about.yml b/.github/workflows/sync-about.yml index 33e35663..5f62c378 100644 --- a/.github/workflows/sync-about.yml +++ b/.github/workflows/sync-about.yml @@ -7,8 +7,8 @@ name: Sync indicator count # # 1. README.md prose — synced on PR branches (this workflow) # 2. GitHub repo "About" description — synced on push to main / v* tag -# 3. Wiki: Home.md / FAQ.md / Streaming-vs-Batch.md -# — synced on push to main / v* tag +# 3. Docs site: index.md / overview.md / Indicators-Overview.md +# (wickra-lib/wickra-docs) — synced on push to main / v* tag* # 4. site/index.md (local-only marketing site, not synced from CI) # 5. org profile README count (wickra-lib/.github, profile/README.md) # — synced on push to main / v* tag* @@ -18,12 +18,12 @@ name: Sync indicator count # "Published versions" table in overview.md + the Rust quickstart prose) # — synced on v* tag only* # -# *Surfaces 5 + 6 need the ABOUT_SYNC_TOKEN to carry extra scope (write on -# wickra-lib/.github, and admin:org for the org-description PATCH); surface 7 -# needs write on wickra-lib/wickra-docs. Until that scope is granted these +# *Surfaces 3 + 7 need the ABOUT_SYNC_TOKEN to have write on +# wickra-lib/wickra-docs; surfaces 5 + 6 need write on wickra-lib/.github and +# admin:org for the org-description PATCH. Until that scope is granted these # steps emit a ::warning:: and soft-skip — they never fail the run. The repo # "About" homepage URL is also enforced in step 2 (constant value, no extra -# scope) so it can never drift back to the old org. +# scope); it points at docs.wickra.org. # # Note: surface 7 carries the release *version*, not the indicator count, so # it is driven by the v* tag (which is the version) rather than the count. @@ -173,9 +173,11 @@ jobs: GH_TOKEN: ${{ secrets.ABOUT_SYNC_TOKEN }} run: | n="${{ steps.count.outputs.count }}" - # Canonical homepage. Swap to the docs domain (e.g. - # https://docs.wickra.org) here once the docs site is live — one place. - homepage="https://github.com/wickra-lib/wickra" + # Canonical homepage — the docs site (P8.3). This is enforced on every + # run, so it must only point at docs.wickra.org once that domain is + # actually live (Cloudflare Pages, P8.1); merging this PR is therefore + # gated on the domain resolving, otherwise the About link would 404. + homepage="https://docs.wickra.org" desc="Streaming-first technical indicators with a Rust core and Python, Node.js, and WebAssembly bindings. ${n} indicators, O(1) per-tick updates, no system dependencies. Drop-in TA-Lib replacement." # Enforce the homepage unconditionally — it is a constant, so this both # corrects the stale kingchenc URL and self-heals any future drift. @@ -189,24 +191,38 @@ jobs: echo "About description + homepage updated." fi - - name: Sync Wiki + # Counter sync target moved from the retired GitHub wiki to the docs site + # repo (wickra-lib/wickra-docs). The count appears in index.md (hero), + # overview.md prose, and Indicators-Overview.md prose. Soft-skips like the + # org steps so a token/scope gap never fails the run. Uses its own clone + # dir (docs-count) so it cannot collide with the tag-only version step + # below, which clones the same repo into `docs`. + - name: Sync docs indicator count (wickra-docs) if: github.event_name != 'pull_request' + continue-on-error: true env: GH_TOKEN: ${{ secrets.ABOUT_SYNC_TOKEN }} run: | n="${{ steps.count.outputs.count }}" - git clone "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.wiki.git" wiki - cd wiki - sed -i -E "s/[0-9]+ (streaming-first )?indicators/${n} \1indicators/g" Home.md FAQ.md Streaming-vs-Batch.md + if ! git clone "https://x-access-token:${GH_TOKEN}@github.com/wickra-lib/wickra-docs.git" docs-count 2>/dev/null; then + echo "::warning::cannot clone wickra-lib/wickra-docs — ABOUT_SYNC_TOKEN likely lacks write on that repo (findings P10.0a). Skipping docs count sync." + exit 0 + fi + cd docs-count + sed -i -E "s/[0-9]+ (streaming-first )?indicators/${n} \1indicators/g" index.md overview.md Indicators-Overview.md if git diff --quiet; then - echo "Wiki unchanged." + echo "Docs indicator count unchanged." exit 0 fi git config user.name "wickra-bot" git config user.email "wickra-bot@users.noreply.github.com" - git add Home.md FAQ.md Streaming-vs-Batch.md + git add index.md overview.md Indicators-Overview.md git commit -m "chore: sync indicator count to ${n}" - git push + if ! git push 2>/dev/null; then + echo "::warning::push to wickra-lib/wickra-docs failed — ABOUT_SYNC_TOKEN likely lacks write (findings P10.0a)." + else + echo "Docs indicator count synced to ${n}." + fi # ----- org-profile sync (soft-skip until PAT scope lands) ------- #