diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 33bb137..2ec4d52 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,28 +1,26 @@ -name: Lint and Format +name: Format on: + push: + branches: + - main pull_request: branches: - main - -jobs: - format: - runs-on: ubuntu-latest +@@ -14,16 +11,18 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Setup Node.js - uses: actions/setup-node@v2 + - name: Set up Node.js + uses: actions/setup-node@v3 with: - node-version: '20' + node-version: '20' - name: Install dependencies - run: npm install --save-dev prettier - - - name: Check formatting - run: npx prettier --check . + run: npm install - - name: Format code - run: npx prettier --write . + - name: Run Prettier to check formatting + run: npm run prettier -- --check + continue-on-error: false