Update and rename formatter.yml to prettier.yml

This commit is contained in:
William Harrison
2024-11-10 20:07:24 +08:00
committed by GitHub
parent 9656848d59
commit 017bc03999
2 changed files with 27 additions and 22 deletions
-22
View File
@@ -1,22 +0,0 @@
name: Formatter
on:
push:
branches:
- main
jobs:
format:
name: "Format"
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Run prettier
# Use -y, like npm install -y
run: npx -y prettier ./domains -w --tab-width 2 --print-width 120
- name: Commit
run: |
git config --global user.name 'is-a.dev'
git config --global user.email 'actions@github.com'
git commit -am "Format domains"
git push
+27
View File
@@ -0,0 +1,27 @@
name: Prettier
on:
push:
branches: [main]
paths:
- "domains/*"
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Run Prettier
run: npx -y prettier ./domains -w --tab-width 2 --print-width 120
- name: Commit
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git commit -am "Format domains"
git push