Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/format-prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Format with Prettier

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout (full)
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install dependencies
run: |
npm ci || npm install
npm install --no-save prettier

- name: Run Prettier (format)
run: npx prettier --write "**/*.{js,jsx,ts,tsx,json,md}"

- name: Commit formatted changes
uses: EndBug/add-and-commit@v9
with:
message: "chore: format code with Prettier"
add: "."
Loading