Skip to content

Commit

Permalink
run prettier on pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
StarManTheGamer committed Jun 5, 2024
1 parent ecb1fdf commit d4c60c3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Prettier Format and Commit

on:
push:
pull_request:
branches:
- main
- 'refs/heads/*'
Expand All @@ -22,9 +22,6 @@ jobs:
- name: Install dependencies
run: npm install

- name: Pull latest changes
run: git pull

- name: Run Prettier
run: npx prettier --write .

Expand All @@ -46,6 +43,7 @@ jobs:

- name: Push changes
if: env.changes_committed == 'true'
run: git push
run: |
git push origin HEAD:${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d4c60c3

Please sign in to comment.