Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/update-cli-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,33 @@ jobs:
go-version: '1.22'

- name: Generate CLI docs
working-directory: cli/temporalcli/internal/cmd/gen-docs
working-directory: cli/internal/cmd/gen-docs
run: |
go run .

- name: Publish generated docs to documentation repo
env:
GH_TOKEN: ${{ github.token }}
COMMIT_AUTHOR: ${{ github.event.inputs.commit_author }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.inputs.commit_author_email }}
CLI_RELEASE_TAG: ${{ github.event.inputs.cli_release_tag }}
COMMIT_MESSAGE: ${{ github.event.inputs.commit_message }}
Comment on lines +69 to +72
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change requested by security bot.

working-directory: docs
run: |
set -ex

git config user.name "${{ github.event.inputs.commit_author }}"
git config user.email "${{ github.event.inputs.commit_author_email }}"
branch_name="update-cli-docs-${{ github.event.inputs.cli_release_tag }}"
git checkout -b $branch_name
cp ../cli/temporalcli/docs/*.mdx docs/cli/
git config user.name "$COMMIT_AUTHOR"
git config user.email "$COMMIT_AUTHOR_EMAIL"

branch_name="update-cli-docs-$CLI_RELEASE_TAG"
git checkout -b "$branch_name"
cp ../cli/dist/docs/*.mdx docs/cli/
git add .
git commit -m "${{ github.event.inputs.commit_message }}"
git commit -m "$COMMIT_MESSAGE"
git push origin "$branch_name"

gh pr create \
--body "Autogenerated PR from https://github.com/temporalio/cli" \
--title "${{ github.event.inputs.commit_message }}" \
--title "$COMMIT_MESSAGE" \
--head "$branch_name" \
--base "main"