diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a593c22..9870661 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,15 +1,27 @@ -name: CI - on: push: - branches: [main, dev] + branches: [main, develop] pull_request: - branches: [main, dev] + branches: [main, develop] jobs: - lint-and-build: + lint-and-typecheck: runs-on: ubuntu-latest + steps: + @@ -24,39 +24,10 @@ jobs: + run: npm ci + + - name: Run ESLint + run: npm run lint -- --max-warnings 50 + + - name: Type check + run: npm run type-check + + build: + runs-on: ubuntu-latest + needs: lint-and-typecheck + steps: - name: Checkout code uses: actions/checkout@v4 @@ -23,11 +35,17 @@ jobs: - name: Install dependencies run: npm ci - - name: Run ESLint - run: npm run lint - - - name: Run TypeScript check - run: npx tsc --noEmit - - - name: Build + - name: Build application run: npm run build + env: + VITE_API_URL: /api + VITE_TELEGRAM_BOT_USERNAME: test_bot + VITE_APP_NAME: Cabinet + VITE_APP_LOGO: V + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + retention-days: 7 \ No newline at end of file