ci(sync-docs): add workflow_dispatch trigger#224
Merged
Conversation
Allow manual invocation of the docs-sync workflow without cutting a
release. Useful for:
- testing sync output against a non-main vc-docs branch (e.g. a long-
running integration branch) before changes reach production
- re-running sync after fixing a docs-sync bug without a release cycle
- backfilling docs into a release branch
Inputs:
- target_branch (default: main) — vc-docs branch to checkout and open
the auto-PR against
- ref_label (default: UTC timestamp) — used in the auto-PR branch name
('auto/sync-vc-shell-<label>') and PR title
Release-triggered runs (release: published) keep their existing
behavior: target main, label with the release tag.
Inputs are passed via env vars (not interpolated directly into shell)
to avoid command injection.
2 tasks
maksimzinchuk
added a commit
that referenced
this pull request
May 12, 2026
## Summary Hotfix on top of #223 / #224. The new workflow_dispatch trigger fails immediately with `Input required and not supplied: token` because the `VC_DOCS_BOT_TOKEN` secret was never provisioned in this repo. Switch to the org-wide `REPO_TOKEN` secret that is already used by `release.yml` and `storybook-ci.yml` in this repo, and by `deploy.yml` in vc-docs — one secret to rotate instead of two. ## What changes - `.github/workflows/sync-docs.yml`: - `token: \${{ secrets.VC_DOCS_BOT_TOKEN }}` → `token: \${{ secrets.REPO_TOKEN }}` (both checkout step and `GH_TOKEN` env on the PR step) - Update top-of-file comment to reference REPO_TOKEN ## Behavior No behavioral change. Same workflow, same triggers, same auto-PR shape (with `auto-generated` label). Only the underlying token identity differs. `REPO_TOKEN` must have `contents:write` and `pull-requests:write` on `VirtoCommerce/vc-docs` — same permissions docs-deploy already exercises in vc-docs. ## Test plan - [ ] After merge: Actions → sync-docs → Run workflow → `target_branch: docs/vc-shell-integration` → Run - [ ] Verify auto-PR opens against the specified branch with the `auto-generated` label, no token error
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
Allow manual invocation of the docs-sync workflow without cutting a release. Useful for:
Inputs
main) — vc-docs branch to checkout and open the auto-PR againstauto/sync-vc-shell-<label>) and PR titleBehavior
release: published(unchanged)mainauto/sync-vc-shell-<release-tag>docs: sync from vc-shell@<release-tag>workflow_dispatchinputs.target_branchauto/sync-vc-shell-<label>docs: manual sync from vc-shell (<label>)Release-triggered runs keep their existing behavior — no changes to the production flow.
Security
All workflow_dispatch inputs are passed via
env:block (not interpolated directly intorun:shell), per the security hook recommendation.Test plan
target_branch: docs/vc-shell-integration→ Runauto-generatedlabel