Skip to content

ci(sync-docs): use shared REPO_TOKEN secret#225

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

ci(sync-docs): use shared REPO_TOKEN secret#225
maksimzinchuk merged 3 commits into
mainfrom
feat/sync-docs-workflow-dispatch

Conversation

@maksimzinchuk
Copy link
Copy Markdown
Collaborator

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

maksimzinchuk and others added 3 commits May 12, 2026 17:49
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.
The org-wide REPO_TOKEN is already used by release.yml and storybook-ci.yml
in this repo and by deploy.yml in vc-docs. Reuse it instead of requiring
a separate VC_DOCS_BOT_TOKEN secret — one less thing to provision and
rotate.
@maksimzinchuk maksimzinchuk merged commit 3cd234d into main May 12, 2026
5 of 6 checks passed
@maksimzinchuk maksimzinchuk deleted the feat/sync-docs-workflow-dispatch branch May 12, 2026 14:59
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