Skip to content

feat: run Prettier on merge to main #1

feat: run Prettier on merge to main

feat: run Prettier on merge to main #1

Workflow file for this run

name: Prettier Check on Merge
on:
push:
branches:
- main
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: npm ci
- name: Run Prettier on specific directories
run: npx prettier --write './packages/core/**/*' './packages/cli/**/*'
- name: Commit changes if any
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Apply Prettier formatting"
git push
continue-on-error: true