Skip to content

Commit a165ce7

Browse files
chore: Add notification for no docs changed (#1505)
1 parent c6bf383 commit a165ce7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/docs-preview-create.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ jobs:
6666
6767
- name: Push
6868
id: push
69+
continue-on-error: true
6970
run: git add -A && git commit -m "sync docs for repo ${{ inputs.repo }}, pr ${{ inputs.pr }}, commit ${{ inputs.sha }}" && git push -u origin ${{ env.BRANCH }} --force
7071

7172
- name: Request preview comment
73+
if: ${{ steps.push.outcome == 'success' }}
7274
uses: peter-evans/repository-dispatch@v3
7375
with:
7476
event-type: 'request-preview-comment'
@@ -77,3 +79,15 @@ jobs:
7779
"repo": "${{ inputs.repo }}",
7880
"pr": "${{ inputs.pr }}"
7981
}
82+
83+
- name: Dispatch docs-unaffected
84+
if: ${{ steps.push.outcome != 'success' }}
85+
uses: peter-evans/repository-dispatch@v3
86+
with:
87+
event-type: 'docs-unaffected'
88+
client-payload: |-
89+
{
90+
"repo": "${{ inputs.repo }}",
91+
"pr": "${{ inputs.pr }}",
92+
"sha": "${{ inputs.sha }}"
93+
}

0 commit comments

Comments
 (0)