mirror of
https://github.com/System-End/My-website.git
synced 2026-04-19 19:45:10 +00:00
ci: auto-fix formatting on PRs instead of just checking
This commit is contained in:
parent
c57945de63
commit
a163b054db
1 changed files with 1 additions and 7 deletions
8
.github/workflows/format.yml
vendored
8
.github/workflows/format.yml
vendored
|
|
@ -50,16 +50,10 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Check formatting (PR)
|
||||
if: github.event_name == 'pull_request'
|
||||
run: pnpm prettier --check "src/**/*.{ts,tsx,css}" "*.{json,js,cjs,ts,md}"
|
||||
|
||||
- name: Fix formatting (push to main)
|
||||
if: github.event_name == 'push'
|
||||
- name: Run prettier
|
||||
run: pnpm format
|
||||
|
||||
- name: Commit formatting fixes
|
||||
if: github.event_name == 'push'
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "style: auto-format with prettier"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue