fix: fix agent ui #253
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: AitoEarn Web Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| env: | |
| MONOREPO_DIR: project/web | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint-and-build: | |
| name: Lint & Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check if web files changed | |
| id: check-changes | |
| run: | | |
| if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^project/web/"; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Skip if no changes | |
| if: steps.check-changes.outputs.changed == 'false' | |
| run: | | |
| echo "No changes in project/web/, skipping checks" | |
| exit 0 | |
| - name: Install pnpm | |
| if: steps.check-changes.outputs.changed == 'true' | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| if: steps.check-changes.outputs.changed == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| cache-dependency-path: ${{ env.MONOREPO_DIR }}/pnpm-lock.yaml | |
| - name: Install dependencies | |
| if: steps.check-changes.outputs.changed == 'true' | |
| working-directory: ${{ env.MONOREPO_DIR }} | |
| run: pnpm install --frozen-lockfile | |
| # - name: Run ESLint | |
| # if: steps.check-changes.outputs.changed == 'true' | |
| # working-directory: ${{ env.MONOREPO_DIR }} | |
| # run: pnpm lint | |
| - name: Run build | |
| if: steps.check-changes.outputs.changed == 'true' | |
| working-directory: ${{ env.MONOREPO_DIR }} | |
| run: pnpm build | |