Update spell.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
with: | |
ref: spell | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Install cspell | |
run: npm install -g cspell | |
- name: Run Spellcheck | |
run: cspell "**/*.mdx" "**/*.md" | |
continue-on-error: true | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "zerops-gh" | |
git config --global user.email "zerops.gh@gmail.com" | |
git add . | |
git commit -m "chore: Auto-correct spelling" || echo "No changes to commit" | |
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" | |
draft: false |