File tree Expand file tree Collapse file tree 1 file changed +37
-2
lines changed
Expand file tree Collapse file tree 1 file changed +37
-2
lines changed Original file line number Diff line number Diff line change 11name : codespell
22
3- on : [push, pull_request]
3+ on :
4+ schedule :
5+ - cron : ' 0 0 * * 0' # Run weekly on Sunday at midnight
6+ workflow_dispatch : # Allow manual trigger
7+ pull_request : # Still check PRs
48
59jobs :
6- codespell :
10+ codespell-check :
11+ # Only check on pull requests
12+ if : github.event_name == 'pull_request'
713 runs-on : ubuntu-latest
814 steps :
915 - uses : actions/checkout@v4
1016 - uses : codespell-project/actions-codespell@v2
1117 with :
1218 path : content/
1319 ignore_words_file : .codespell-ignore
20+
21+ codespell-fix :
22+ # Auto-fix and create PR on schedule or manual trigger
23+ if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
24+ runs-on : ubuntu-latest
25+ permissions :
26+ contents : write
27+ pull-requests : write
28+ steps :
29+ - uses : actions/checkout@v4
30+
31+ - name : Install codespell
32+ run : pip install codespell
33+
34+ - name : Run codespell with auto-fix
35+ run : codespell content/ -I .codespell-ignore -w
36+
37+ - name : Create Pull Request
38+ uses : peter-evans/create-pull-request@v6
39+ with :
40+ commit-message : ' Fix spelling errors found by codespell'
41+ title : ' Fix spelling errors'
42+ body : |
43+ This PR fixes spelling errors automatically detected by codespell.
44+
45+ Please review the changes carefully to ensure corrections are appropriate.
46+ branch : automated/spelling-fixes
47+ delete-branch : true
48+ labels : documentation, automated
You can’t perform that action at this time.
0 commit comments