Skip to content

Commit e3edc31

Browse files
authored
fix(sync): fix CI workflow sync
Replaced commit and push step with create or update pull request action to automate documentation updates.
1 parent c8ec9bb commit e3edc31

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

.github/workflows/sync.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
permissions:
1010
contents: write
11+
pull-requests: write
1112

1213
jobs:
1314
sync:
@@ -64,11 +65,20 @@ jobs:
6465
if: steps.check.outputs.changed == 'true'
6566
run: npm run generate-docs
6667

67-
- name: Commit and push
68+
- name: Create pull request
6869
if: steps.check.outputs.changed == 'true'
69-
run: |
70-
git config user.name "github-actions[bot]"
71-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
72-
git add HEAD_COMMIT pages/
73-
git commit -m "chore: sync webpack docs to $(echo ${{ steps.latest.outputs.latest }} | cut -c1-7)"
74-
git push
70+
uses: gr2m/create-or-update-pull-request-action@b65137ca591da0b9f43bad7b24df13050ea45d1b # v1.10.1
71+
with:
72+
commit-message: "chore: sync webpack docs to ${{ steps.latest.outputs.latest }}"
73+
title: "chore: sync webpack docs to ${{ steps.latest.outputs.latest }}"
74+
body: |
75+
Automated update of webpack docs.
76+
77+
- Latest webpack commit: ${{ steps.latest.outputs.latest }}
78+
- Previous commit: ${{ steps.latest.outputs.current }}
79+
branch: "chore/sync-webpack"
80+
base: "main"
81+
update-branch: true
82+
add-paths: |
83+
HEAD_COMMIT
84+
pages/

0 commit comments

Comments
 (0)