From 99d95c826707be126277a7bb74c4479ea98c1a5f Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Thu, 17 Jul 2025 11:55:20 +0900 Subject: [PATCH] Create PR for translated docs --- .github/workflows/update-docs.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index fb7ad61e6..2def4f03e 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -15,6 +15,7 @@ on: jobs: update-docs: + if: "!contains(github.event.head_commit.message, 'Update all translated document pages')" name: Build and Push Translated Docs runs-on: ubuntu-latest timeout-minutes: 20 @@ -34,14 +35,26 @@ jobs: - name: Build full docs run: make build-full-docs - - name: Commit and push changes + - name: Commit changes + id: commit run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add docs/ if [ -n "$(git status --porcelain)" ]; then git commit -m "Update all translated document pages" - git push + echo "committed=true" >> "$GITHUB_OUTPUT" else echo "No changes to commit" + echo "committed=false" >> "$GITHUB_OUTPUT" fi + + - name: Create Pull Request + if: steps.commit.outputs.committed == 'true' + uses: peter-evans/create-pull-request@v6 + with: + commit-message: "Update all translated document pages" + title: "Update all translated document pages" + body: "Automated update of translated documentation" + branch: update-translated-docs-${{ github.run_id }} + delete-branch: true