-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (47 loc) · 1.4 KB
/
spell.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Spellcheck
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Set up Node.js (if needed for spellcheck tools)
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Adjust the version as needed
# Run a spellcheck tool (using cspell as an example)
- name: Install cspell
run: npm install -g cspell
- name: Run Spellcheck
run: cspell "**/*.mdx" "**/*.md"
continue-on-error: true
- name: Create new branch, commit and push changes
run: |
git config --global user.name "zerops-gh"
git config --global user.email "[email protected]"
BRANCH_NAME="spell"
git checkout -b spell
git add .
git commit -m "chore: Auto-correct spelling"
git push origin spell
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: spell
base: main
title: "Spellcheck fixes"
body: |
This PR includes automatic spelling corrections.
labels: "spellcheck"