docs: update sanity-l10n skill for field-level translation workflow (… #103
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: | |
| workflow_dispatch: | |
| jobs: | |
| agentic-localization: | |
| name: agentic-localization (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| environment: agentic-localization | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| defaults: | |
| run: | |
| working-directory: agentic-localization | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: pnpm install | |
| - name: Format check | |
| run: pnpm run format:check | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Typecheck | |
| run: pnpm run typecheck | |
| env: | |
| SANITY_STUDIO_PROJECT_ID: ${{ vars.SANITY_PROJECT_ID }} | |
| SANITY_STUDIO_DATASET: ${{ vars.SANITY_DATASET }} | |
| - name: Unit tests | |
| run: pnpm run test | |
| - name: Validate template | |
| run: pnpm run validate | |
| - name: Manifest extract | |
| run: pnpm --filter studio exec sanity manifest extract | |
| env: | |
| SANITY_STUDIO_PROJECT_ID: ${{ vars.SANITY_PROJECT_ID }} | |
| SANITY_STUDIO_DATASET: ${{ vars.SANITY_DATASET }} | |
| - name: Check function bundle sizes | |
| run: | | |
| max_kb=512 | |
| failed=0 | |
| for dir in functions/dist/*/; do | |
| bundle="$dir/index.js" | |
| [ -f "$bundle" ] || continue | |
| size_kb=$(( $(wc -c < "$bundle") / 1024 )) | |
| name=$(basename "$dir") | |
| if [ "$size_kb" -gt "$max_kb" ]; then | |
| echo "::error::$name bundle is ${size_kb} KB (max ${max_kb} KB)" | |
| failed=1 | |
| else | |
| echo "$name: ${size_kb} KB ✓" | |
| fi | |
| done | |
| exit $failed | |
| ai-shopping-assistant: | |
| name: ai-shopping-assistant | |
| runs-on: ubuntu-latest | |
| environment: ai-shopping-assistant | |
| defaults: | |
| run: | |
| working-directory: ai-shopping-assistant | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - run: pnpm install | |
| - name: Lint app | |
| run: pnpm --filter app run lint | |
| - name: Typecheck app | |
| run: pnpm --filter app run type-check | |
| - name: Typecheck studio | |
| run: cd studio && pnpm exec tsc --noEmit | |
| - name: Validate template | |
| run: pnpm dlx @sanity/template-validator |