fix: ensure deps are installed during translate workflow

This commit is contained in:
Henry
2026-02-23 23:11:48 +00:00
parent 91bc319cf1
commit fae169c691

View File

@@ -14,16 +14,24 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install dependencies
run: pnpm install --filter @kan/web...
- name: Extract translations - name: Extract translations
working-directory: apps/web working-directory: apps/web
run: npx --yes @lingui/cli extract run: pnpm lingui:extract
- name: Lingo.dev - name: Lingo.dev
uses: lingodotdev/lingo.dev@main uses: lingodotdev/lingo.dev@main
with: with:
@@ -33,11 +41,11 @@ jobs:
commit-author-name: "${{ github.actor }}" commit-author-name: "${{ github.actor }}"
commit-author-email: "${{ github.actor }}@users.noreply.github.com" commit-author-email: "${{ github.actor }}@users.noreply.github.com"
parallel: true parallel: true
- name: Compile translations - name: Compile translations
working-directory: apps/web working-directory: apps/web
run: npx --yes @lingui/cli compile --typescript run: pnpm lingui:compile
- name: Commit compiled translations - name: Commit compiled translations
run: | run: |
git config --local user.email "${{ github.actor }}@users.noreply.github.com" git config --local user.email "${{ github.actor }}@users.noreply.github.com"
@@ -46,4 +54,3 @@ jobs:
git add apps/web/src/locales/*/messages.ts git add apps/web/src/locales/*/messages.ts
git diff --staged --quiet || (git commit -m "chore: compile translations" && git push) git diff --staged --quiet || (git commit -m "chore: compile translations" && git push)
fi fi