Skip to content

Create spell.yml

Create spell.yml #1

Workflow file for this run

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"