Skip to content

route error fix

route error fix #5

name: Format and Push
on:
push:
branches:
- main
- 'feature/*'
- 'bugfix/*'
pull_request:
branches:
- main
- 'feature/*'
- 'bugfix/*'
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '21.7.1'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Format code with Prettier
run: pnpm format
- name: Check for changes and push if needed
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: format code with Prettier"
git push
else
echo "No formatting changes to push."
fi