File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Look for broken links to documentation"
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize]
6+ # schedule:
7+ # # Every day at 00:00 UTC
8+ # - cron: '0 0 * * *'
9+
10+ jobs :
11+ run-docs-test :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Run the docs test
19+ run : false
20+
21+ - name : Create PR if test failed
22+ if : failure()
23+ run : |
24+ export PR_TITLE="Fixing broken documentation links"
25+ export RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
26+ export PR_BODY="Some links to the documentation are broken.\nSee: $RUN_URL"
27+ export PR_BRANCH="fix-broken-docs-links-${{ github.run_id }}"
28+
29+ git switch -c $PR_BRANCH
30+ git push
31+ gh pr create \
32+ --draft \
33+ --title $PR_TITLE \
34+ --body $PR_BODY \
35+ --base master \
36+ --head $PR_BRANCH \
37+ --label "bug"
You can’t perform that action at this time.
0 commit comments