fix: prettier workflow #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: Format Code w/ Prettier | |
on: push | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🏗 Setup repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: 🏗 Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: 📦 Install dependencies | |
run: npm ci | |
- name: 👷 Format code | |
uses: actionsx/prettier@v3 | |
with: | |
args: --write . | |
- name: 🎨 Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "chore: apply formatting changes" | |
branch: ${{ github.head_ref }} |