-
-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add workflow_dispatch to docs #6235
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## unstable #6235 +/- ##
=========================================
Coverage 80.83% 80.83%
=========================================
Files 185 185
Lines 17986 17986
Branches 1082 1082
=========================================
Hits 14539 14539
Misses 3421 3421
Partials 26 26 |
Performance Report✔️ no performance regression detected Full benchmark results
|
|
||
jobs: | ||
docs: | ||
runs-on: buildjet-4vcpu-ubuntu-2204 | ||
env: | ||
DEPLOY_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || 'stable' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little strange that the default here is 'stable' but above, its 'unstable'. I'd say pick one or the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was so that its deploying stable
if running push
and defaulting to unstable
in the manual deploy option with workflow_dispatch
.
I wanted to maintain the original behavior of docs deploying when merged to stable and assumed we would most likely be manually deploying from unstable
after a docs PR but between releases that auto deploy.
Do you want me to convert the hardcoded branch to || github.ref }}
so that it will be more clear that its the value that push
triggered the workflow?
The actions/checkout defaults the ref value to github.ref
(or default branch if no github.ref
is available) when one is not provided in the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, that makes sense! Looks good as is
🎉 This PR is included in v1.14.0 🎉 |
Motivation
Adds a button to the docs workflow to manually deploy the docs website from any branch. The workflow will still run on pushes to stable but it also can now be run to deploy a different branch of the docs. Any
branch
,tag
, orcommit
will work and the workflow will validate that its a validateref
before running the deploy process. The default was set asunstable
as I assumed we would want to PR the docs updates before deploying them but any branch will work.Note: The workflow will still run on
stable
automatically to keep the docs in sync with our releases as they are released. We will need to be cognizant of this if there are changes to the docs that need to get merged with releases as we normally do so should not be a big hurdle but I wanted to make sure that is noted here.Note: There is a default dropdown provided for "workflow_dispatch" events and the dropdown will specify the version of the workflow that is being run. The second input field is the one that we want to use at deploy time. It will select the
ref
for the docs that will be deployed.Testing
Was developed with a bit of help from chatgpt to verify that the syntax was correct but we may need to run once to triple check there are no bugs.