Skip to content

readme update, final initializations #3

readme update, final initializations

readme update, final initializations #3

Workflow file for this run

name: Auto Format Code
on:
push:
branches: [ main, develop, feature/*, bugfix/* ]
jobs:
format:
name: Auto Format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: |
frontend/package-lock.json
backend/package-lock.json
- name: Install frontend dependencies
working-directory: ./frontend
run: npm ci
- name: Format frontend code
working-directory: ./frontend
run: npm run format
- name: Install backend dependencies
working-directory: ./backend
run: npm ci
- name: Format backend code
working-directory: ./backend
run: npm run format
- name: Commit formatted code
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git diff --staged --quiet || git commit -m "Auto-format code with Prettier"
git push