diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index ddecb4f..096e8e2 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -1,9 +1,26 @@ --- -on: [push, pull_request] +on: [push] -name: Build +name: Push jobs: + lint: + name: Lint + runs-on: docker + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + - name: Install dependencies + run: yarn install + - name: Check code formatting + run: yarn lint:prettier + - name: Check code quality + run: yarn lint:eslint + - name: Check types + run: yarn lint:tsc + build: name: Build runs-on: docker diff --git a/package.json b/package.json index a846f38..56e4ef5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,10 @@ "build:targets": "yarn build:client && yarn build:server", "build:client": "tsc -b && vite build --outDir dist/client", "build:server": "tsc -b && vite build --outDir dist/server --ssr src/entry-server.tsx", - "lint": "eslint .", + "lint": "yarn lint:tsc && yarn lint:eslint && yarn lint:prettier", + "lint:prettier": "prettier --check .", + "lint:eslint": "eslint .", + "lint:tsc": "tsc -b --noEmit", "preview": "vite preview" }, "devDependencies": {