name: Check web Code - Prettier

on:
  pull_request:
    paths:
      - "agenta-web/**"

jobs:
  prettier:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v4

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

      - name: Install Prettier
        run: npm install prettier@3.2.5 --no-save
        working-directory: agenta-web

      - name: Run Prettier
        run: |
          npx prettier -v
          npx prettier --check .
        working-directory: agenta-web
