Skip to content

fix(ci): handle workflow_dispatch event for docs build#21535

Open
ecormany wants to merge 3 commits into
edgefrom
fix/wire-workflow-dispatch-to-deploy-ci-config
Open

fix(ci): handle workflow_dispatch event for docs build#21535
ecormany wants to merge 3 commits into
edgefrom
fix/wire-workflow-dispatch-to-deploy-ci-config

Conversation

@ecormany
Copy link
Copy Markdown
Contributor

@ecormany ecormany commented May 18, 2026

Overview

The workflow_dispatch: trigger added to docs-build-deploy.yaml in #21054 was never wired up to the Python deployment script, so it wouldn't do anything (except fail).

This PR updates the script to handle the intended use case of deploying WIP docs branches to sandbox before opening a PR.

Test Plan and Hands on Testing

Automated tests:

  • Added test_resolve_ci_config_workflow_dispatch_branch: confirms a branch dispatch resolves to sandbox with the branch name as the prefix.
  • Added test_resolve_ci_config_workflow_dispatch_tag_raises: confirms a tag dispatch raises a ValueError with a message pointing to the push-tag path.

Manually tested the workflow on a sub-branch of this one.

Changelog

🤖

  • deploy_ci_config.py: added GITHUB_EVENT_WORKFLOW_DISPATCH constant and a handler that routes branch dispatches to sandbox and rejects tag dispatches with a clear error message.
  • tests/test_deploy_ci_config.py: two new test cases covering the above behavior.

Review requests

Seems good? Matches our other CI patterns?

Risk assessment

Low.

Manual runs of docs-build-deploy.yaml were failing because
`_determine_environment_and_prefix` had no branch for the
`workflow_dispatch` event name, causing a ValueError in the
`determine-deploy-config` job.

Branch dispatches now resolve to a sandbox deployment using the branch
name as the prefix (the intended WIP use case). Tag dispatches raise a
clear ValueError directing users to the push-tag path instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ecormany ecormany changed the title fix(ci): handle workflow_dispatch event in deploy_ci_config.py fix(ci): handle workflow_dispatch event for docs build May 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.65%. Comparing base (8a28e27) to head (feb3865).
⚠️ Report is 6 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #21535      +/-   ##
==========================================
- Coverage   21.73%   21.65%   -0.09%     
==========================================
  Files        3904     3906       +2     
  Lines      326986   327081      +95     
  Branches    58090    58155      +65     
==========================================
- Hits        71071    70828     -243     
- Misses     252930   253287     +357     
+ Partials     2985     2966      -19     
Flag Coverage Δ
app 45.92% <ø> (-0.47%) ⬇️
protocol-designer 39.83% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ecormany ecormany marked this pull request as ready for review May 18, 2026 18:56
@ecormany ecormany requested review from jwwojak and y3rsh May 18, 2026 18:56
Copy link
Copy Markdown
Contributor

@jwwojak jwwojak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a feature or capability that will be extremely helpful for sharing early versions of draft docs. Wholeheartedly support it.

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.

2 participants