diff --git a/.github/workflows/update-cli-docs.yml b/.github/workflows/update-cli-docs.yml index b117e23ed4..aec532a88e 100644 --- a/.github/workflows/update-cli-docs.yml +++ b/.github/workflows/update-cli-docs.yml @@ -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 }} 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"