Skip to content

chore: 프리티어 CI #1

chore: 프리티어 CI

chore: 프리티어 CI #1

name: Prettier Auto Fix
on:
pull_request:
branches:
- dev
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '21'
- name: Install dependencies
run: pnpm install
- name: Run Prettier
run: pnpm run format
- name: Commit changes
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 "chore: apply Prettier formatting" || exit 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes
run: git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}