fix(ci): handle workflow_dispatch event for docs build#21535
Open
ecormany wants to merge 3 commits into
Open
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
jwwojak
approved these changes
May 19, 2026
Contributor
jwwojak
left a comment
There was a problem hiding this comment.
This is a feature or capability that will be extremely helpful for sharing early versions of draft docs. Wholeheartedly support it.
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.
Overview
The
workflow_dispatch:trigger added todocs-build-deploy.yamlin #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:
test_resolve_ci_config_workflow_dispatch_branch: confirms a branch dispatch resolves tosandboxwith the branch name as the prefix.test_resolve_ci_config_workflow_dispatch_tag_raises: confirms a tag dispatch raises aValueErrorwith a message pointing to the push-tag path.Manually tested the workflow on a sub-branch of this one.
Changelog
🤖
deploy_ci_config.py: addedGITHUB_EVENT_WORKFLOW_DISPATCHconstant 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.