feat: rewrite catalof filters, redesign ui filters #24
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: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| # Эти разрешения нужны для деплоя на GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # включаем corepack и ставим Node.js с кешированием | |
| - run: corepack enable | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Unit tests | |
| run: npm run test:unit | |
| # Запускаем dev‑сервер и e2e‑тесты (как раньше) | |
| - name: E2E tests | |
| run: npx start-server-and-test "npm run dev" http://localhost:3000 "npm run test:e2e" | |
| # Сборка статического сайта для GitHub Pages | |
| - name: Build site | |
| run: npm run build | |
| env: | |
| # говорим Nitro собрать проект для github_pages | |
| NITRO_PRESET: github_pages | |
| # Упаковываем статические файлы в артефакт для Pages | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./.output/public | |
| # Отдельный джоб деплоя, который запускается только если build успешен | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |