docs: remove all historical docs, rewrite VitePress config #206
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| backend-lint-test: | |
| name: Backend Lint & Test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| cache-dependency-path: backend/pyproject.toml | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Lint with ruff | |
| run: ruff check app/ tests/ | |
| - name: Check formatting | |
| run: ruff format --check app/ tests/ | |
| - name: Type check with mypy | |
| run: mypy app/ --ignore-missing-imports | |
| continue-on-error: true | |
| - name: Run tests | |
| run: pytest tests/ -v --tb=short --cov=app --cov-report=term-missing | |
| env: | |
| APP_ENV: testing | |
| LLM_PROVIDER: mock | |
| DATABASE_URL: "sqlite:///${{ runner.temp }}/omelette-test.db" | |
| DATA_DIR: ${{ runner.temp }}/omelette-test-data | |
| frontend-lint-build: | |
| name: Frontend Lint & Build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npx tsc --noEmit | |
| - name: Build | |
| run: npm run build | |
| - name: Run frontend tests | |
| run: npm test | |
| e2e-tests: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| needs: [backend-lint-test, frontend-lint-build] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: frontend/package-lock.json | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| cache-dependency-path: backend/pyproject.toml | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| working-directory: frontend | |
| - name: Install backend dependencies | |
| run: pip install -e ".[prod]" | |
| working-directory: backend | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| working-directory: frontend | |
| - name: Start backend | |
| run: | | |
| mkdir -p ${{ runner.temp }}/omelette-test-data | |
| APP_ENV=testing LLM_PROVIDER=mock DATABASE_URL="sqlite:///${{ runner.temp }}/omelette-test.db" DATA_DIR="${{ runner.temp }}/omelette-test-data" python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 & | |
| working-directory: backend | |
| - name: Run E2E tests | |
| run: npm test | |
| working-directory: frontend | |
| env: | |
| PLAYWRIGHT_HTML: true | |
| - name: Upload E2E report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: frontend/playwright-report/ | |
| retention-days: 30 | |
| docs-build: | |
| name: Build Docs | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: docs | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build docs | |
| run: npm run docs:build | |
| docs-deploy: | |
| name: Deploy Docs | |
| needs: docs-build | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| defaults: | |
| run: | |
| working-directory: docs | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build docs | |
| run: npm run docs:build | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/.vitepress/dist | |
| - name: Deploy to GitHub Pages | |
| id: deploy | |
| uses: actions/deploy-pages@v4 |