Skip to content

ci(sync-docs): add workflow_dispatch trigger#224

Merged
maksimzinchuk merged 1 commit into
mainfrom
feat/sync-docs-workflow-dispatch
May 12, 2026
Merged

ci(sync-docs): add workflow_dispatch trigger#224
maksimzinchuk merged 1 commit into
mainfrom
feat/sync-docs-workflow-dispatch

Conversation

@maksimzinchuk
Copy link
Copy Markdown
Collaborator

Summary

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

Behavior

Trigger Base branch Branch name PR title
release: published (unchanged) main auto/sync-vc-shell-<release-tag> docs: sync from vc-shell@<release-tag>
workflow_dispatch inputs.target_branch auto/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 into run: shell), per the security hook recommendation.

Test plan

  • After merge, try: 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
  • Verify release-triggered runs still work unchanged on next release cut

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.
@maksimzinchuk maksimzinchuk merged commit 503c4dd into main May 12, 2026
8 of 9 checks passed
@maksimzinchuk maksimzinchuk deleted the feat/sync-docs-workflow-dispatch branch May 12, 2026 14:50
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
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