Skip to content
Merged
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
23 changes: 19 additions & 4 deletions .github/workflows/update-cli-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@ jobs:
go run ./cmd/gen-docs -input internal/temporalcli/commands.yaml -input cliext/option-sets.yaml -output dist/docs
go run ./cmd/gen-docs -input ../cloud-cli/temporalcloudcli/commands.yml -output dist/docs -subdir cloud

- name: Copy generated command reference into the docs repo
working-directory: docs
run: |
set -ex

# Regenerate the command reference pages. cp -R preserves the cloud/
# subdirectory produced by -subdir.
rm -rf docs/cli/command-reference
mkdir -p docs/cli/command-reference
cp -R ../cli/dist/docs/* docs/cli/command-reference/

# gen-docs intentionally does not emit index.mdx landing pages: those
# are hand-maintained (custom ordering, embedded components such as
# ReleaseNoteHeader). Restore them after regeneration so they are not
# lost by the rm -rf above.
git checkout HEAD -- docs/cli/command-reference/index.mdx
git checkout HEAD -- docs/cli/command-reference/cloud/index.mdx

- name: Publish generated docs to documentation repo
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -93,10 +111,7 @@ jobs:

branch_name="update-cli-docs-$CLI_RELEASE_TAG"
git checkout -b "$branch_name"
rm -rf docs/cli/command-reference
mkdir -p docs/cli/command-reference
cp -r ../cli/dist/docs/* docs/cli/command-reference/
git add .
git add -A docs/cli/command-reference
git commit -m "$COMMIT_MESSAGE"
git push origin "$branch_name"

Expand Down