Skip to content

Add workflow to auto-fix Prettier formatting #1

Add workflow to auto-fix Prettier formatting

Add workflow to auto-fix Prettier formatting #1

name: Fix Formatting
on:
push:
branches: [main]
paths:
- '.github/workflows/fix-formatting.yml'
permissions:
contents: write
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Run Prettier
run: npx prettier --write "**/*.{js,json,md}"
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: fix Prettier formatting"