Skip to content

Commit 068ea7c

Browse files
committed
create prs
1 parent 741961a commit 068ea7c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/update-docs.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,32 @@ jobs:
2929
cache: 'pnpm'
3030
- name: Install dependencies
3131
run: pnpm install
32+
3233
- name: Translate docs
3334
env:
3435
OPENAI_API_KEY: ${{ secrets.PROD_OPENAI_API_KEY }}
3536
run: pnpm docs:translate
37+
3638
- name: Commit changes
39+
id: commit
3740
run: |
3841
git config user.name "github-actions[bot]"
3942
git config user.email "github-actions[bot]@users.noreply.github.com"
4043
git add docs/
4144
if [ -n "$(git status --porcelain)" ]; then
4245
git commit -m "Update all translated document pages"
43-
git push
46+
echo "committed=true" >> "$GITHUB_OUTPUT"
4447
else
4548
echo "No changes to commit"
49+
echo "committed=false" >> "$GITHUB_OUTPUT"
4650
fi
51+
52+
- name: Create Pull Request
53+
if: steps.commit.outputs.committed == 'true'
54+
uses: peter-evans/create-pull-request@v6
55+
with:
56+
commit-message: "Update all translated document pages"
57+
title: "Update all translated document pages"
58+
body: "Automated update of translated documentation"
59+
branch: update-translated-docs-${{ github.run_id }}
60+
delete-branch: true

0 commit comments

Comments
 (0)