From d7f292809dbc7c5674b593e73a0a4f5dd3ce831e Mon Sep 17 00:00:00 2001 From: Tony Hsu Date: Mon, 24 Feb 2025 13:46:57 +0100 Subject: [PATCH] Fix doc step with branch --- .github/workflows/publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d788fe40c73..5580aa2c4bc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -269,11 +269,16 @@ jobs: with: fetch-depth: 0 - run: | - JOB_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs/${{ github.job }}" + JOB_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + TEMP_BRANCH="update-document-v${GEM_VERSION}" + + # Create and checkout a new branch from the tag + git checkout -b "${TEMP_BRANCH}" "v${GEM_VERSION}" + git push origin "${TEMP_BRANCH}" gh pr create \ --base release \ - --head master \ + --head "${TEMP_BRANCH}" \ --title "Update document v${GEM_VERSION}" \ --body "This is an auto-generated PR to update documentation from [here](${JOB_URL}). Please merge (with a merge commit) when ready." \ --label "docs"