feat(sync-docs): ref override for previewing branches#73
Merged
Conversation
Add SYNC_DOCS_REF_<SLUG> env var (e.g. SYNC_DOCS_REF_VOICE) to pin a source to a specific branch/tag/sha instead of the default "latest tag, fallback to main" logic. When set, the override is the only ref tried — no fallback — so typos fail loudly instead of silently shipping main. preview.yml exposes this via workflow_dispatch inputs voice_ref and cli_ref so previewing in-flight docs branches (e.g. wavekat-voice's feat/onboarding-v2) is a one-click action from the Actions UI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying wavekat-com with
|
| Latest commit: |
caa666d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dcb97ef9.wavekat-com.pages.dev |
| Branch Preview URL: | https://feat-sync-docs-ref-override.wavekat-com.pages.dev |
- tryLocal now honors SYNC_DOCS_REF_<SLUG>, extracting docs from that ref via git archive against a local clone. Lets you preview an in-flight branch with WAVEKAT_LOCAL_REPOS without needing a token or going through CI. - tryRemote now logs git's actual stderr (last 2 lines) and distinguishes "clone failed" from "clone ok but docsPath missing". No more silent "no docs found at any ref". - Flatten slashes in ref names when building tmp dirs so refs like feat/onboarding-v2 don't create nested directories. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
wavekat-eason
pushed a commit
that referenced
this pull request
May 23, 2026
🤖 I have created a release *beep* *boop* --- ## [0.0.25](wavekat-com-v0.0.24...wavekat-com-v0.0.25) (2026-05-23) ### Features * enable voice docs sync from wavekat-voice ([#70](#70)) ([7353fa3](7353fa3)) * **sync-docs:** ref override for previewing branches ([#73](#73)) ([94eeadf](94eeadf)) ### Bug Fixes * **ci:** unblock private docs sync from runner ([#72](#72)) ([a82b0ee](a82b0ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SYNC_DOCS_REF_<SLUG>env var support toscripts/sync-docs.js— when set, pins that source to the specified branch/tag/sha and skips the "latest tag → main" fallback (so typos fail loudly).preview.ymlviaworkflow_dispatchinputsvoice_refandcli_refso you can preview an in-flight docs branch by triggering the workflow from the Actions UI without touching code.How to use
wavekat.comto build (usuallymain)voice_refwith e.g.feat/onboarding-v2(and/orcli_ref)Leave inputs empty for the default tag-based behavior.
Notes
workflow_dispatch. Regular PR builds and prod releases use the default (latest tag).release.ymldoesn't get inputs — prod always tracks tags.Test plan
SYNC_DOCS=1 SYNC_DOCS_REF_VOICE=feat/onboarding-v2 SYNC_DOCS_TOKEN=... node scripts/sync-docs.jspins voice to that branch.voice_ref=feat/onboarding-v2produces a preview with the in-flight docs.🤖 Generated with Claude Code