Skip to content

Commit

Permalink
Added Auto Formatting Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavberi committed Mar 12, 2024
1 parent c6da32a commit 932501c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Auto Formatting

on:
push:
branches:
- master

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Prettier
run: |
npm install --global prettier
- name: Format with Prettier
run: prettier --write "**/*.{js,jsx,md,mdx,css,yaml}"

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply Prettier Formatting Fixes

# - name: Remove Formatting Branch
# run: |
# if git rev-parse --verify formatting >/dev/null 2>&1; then
# git push origin --delete formatting
# fi

0 comments on commit 932501c

Please sign in to comment.