- web-ci.yml: Remove web/ path refs (app is at repo root), fix cache paths, update Vercel action to v30 - ios-ci.yml: Fix swift-format tool name, use debug build for PR CI, add TestFlight deployment job, use env var for Xcode path - Scaffold package.json, tsconfig.json, vite.config.ts for web project at root
108 lines
2.2 KiB
YAML
108 lines
2.2 KiB
YAML
name: Web CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "*.json"
|
|
- "*.ts"
|
|
- "*.tsx"
|
|
- "*.js"
|
|
- "*.jsx"
|
|
- "*.html"
|
|
- ".github/workflows/web-ci.yml"
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "*.json"
|
|
- "*.ts"
|
|
- "*.tsx"
|
|
- "*.js"
|
|
- "*.jsx"
|
|
- "*.html"
|
|
- ".github/workflows/web-ci.yml"
|
|
|
|
concurrency:
|
|
group: web-ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
name: Type Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Type check
|
|
run: npx tsc --noEmit
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run tests
|
|
run: npx vitest run --reporter=verbose
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
deploy:
|
|
name: Deploy to Vercel
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Deploy to Vercel
|
|
uses: amondnet/vercel-action@v30
|
|
with:
|
|
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
|
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
|
|
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
vercel-args: --prod
|