Create GH action for CLI docs auto-updating#3525
Conversation
|
|
||
| - name: Generate CLI docs | ||
| run: | | ||
| cd cli/temporalcli/internal/cmd/gen-docs |
There was a problem hiding this comment.
Can use working-directory setting here instead
| git config user.name "${{ github.event.inputs.commit_author }}" | ||
| git config user.email "${{ github.event.inputs.commit_author_email }}" | ||
|
|
||
| git checkout -b ${{ github.event.inputs.cli_branch }} |
There was a problem hiding this comment.
Is there value in checking out a certain CLI branch after having done so via the checkout step before?
There was a problem hiding this comment.
We checkout main from the checkout step for Documentation, then create a new branch here. Seems like it's confusing using the same branch name in repos
There was a problem hiding this comment.
oh I see the issue, we shouldn't be checking out github.event.inputs.cli_branch, but the release tag for the CLI repo
| git add . | ||
| git commit -m "${{ github.event.inputs.commit_message }}" | ||
| git push origin "${{ github.event.inputs.cli_branch }}" |
There was a problem hiding this comment.
A bit confused, so which repo/branch is this pushing code to?
There was a problem hiding this comment.
This is pushing code to this repo, from a branch cli-update-docs-(release #)
fairlydurable
left a comment
There was a problem hiding this comment.
Unblocking this work from @yuandrew
This is a purely platform PR and has been internally reviewed by the SDK team with permission from the docs team.
Thanks for helping to add auto-updating CLI docs!
## What was changed <!-- Describe what has changed in this PR --> Created a new Github Action that auto-generates and publishes a PR to the [documentation repo](https://github.com/temporalio/documentation) with the latest generated CLI docs. Corresponding docs side PR is already merged, temporalio/documentation#3525, and first PR of the auto-generated docs is merged in temporalio/documentation#3528. Docs side YML: https://github.com/temporalio/documentation/blob/main/.github/workflows/update-cli-docs.yml ## Why? <!-- Tell your future self why have you made these changes --> Makes keeping CLI docs up to date significantly easier. ## Checklist <!--- add/delete as needed ---> 1. Closes 2. How was this tested: <!--- Please describe how you tested your changes/how we can test them --> Tested in this PR, but there's a small chance I missed something in the actual release trigger workflow. No way to fully test that until a new release is cut after this action is on main. 3. Any docs updates needed? <!--- update README if applicable or point out where to update docs.temporal.io -->
What does this PR do?
Creates a GH Action that will automatically be triggered on each CLI release that will pull in the latest docs generated by the CLI repo. This will help keep the 2 in sync.
Example PR created: #3528
from run https://github.com/temporalio/documentation/actions/runs/14449216457/job/40517421920
Notes to reviewers
I am thinking once this automatic PR is created, folks from the Documentation team can leave feedback, and any changes required will be added to this PR, as well as a CLI repo PR. That would mean the CLI side changes wouldn't necessarily make it into the release itself, but as long as a CLI side PR is created with the same changes, it will make it into source for the next release. This way CLI releases won't be blocked on minor docs feedback/changes.
If feedback is significant, the release can be edited with the changes (I think, not 100% familiar with how editing a release on GH works).