chore(deps): update dependency @sanity/pkg-utils to ^6.11.12 (#805) #323
This file contains 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: AI translate | |
'on': | |
workflow_dispatch: | |
inputs: | |
locale: | |
type: choice | |
description: Locale to auto translate | |
options: | |
- ALL | |
- be-BY | |
- cs-CZ | |
- da-DK | |
- de-DE | |
- es-ES | |
- fi-FI | |
- fr-FR | |
- hr-HR | |
- hu-HU | |
- is-IS | |
- it-IT | |
- ja-JP | |
- ka-GE | |
- kn-IN | |
- ko-KR | |
- nb-NO | |
- nl-NL | |
- nn-NO | |
- pl-PL | |
- pt-BR | |
- pt-PT | |
- ru-KZ | |
- sv-SE | |
- th-TH | |
- tr-TR | |
- uk-UA | |
- vi-VN | |
- zh-Hans | |
- zh-Hant | |
default: ALL | |
push: | |
branches: | |
- main | |
paths: | |
- package.json | |
jobs: | |
translate-and-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
node-version: lts/* | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run reconcile | |
run: pnpm run reconcile | |
- name: Configure git | |
run: | | |
git config --global user.name 'AutoTranslator' | |
git config --global user.email '[email protected]' | |
- name: Run autotranslate for all locales | |
if: >- | |
${{ github.event.inputs.locale == '' || github.event.inputs.locale == | |
'ALL' }} | |
run: pnpm run autotranslate --git | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run autotranslate for specific locale | |
if: >- | |
${{ github.event.inputs.locale != '' && github.event.inputs.locale != | |
'ALL' }} | |
run: >- | |
pnpm run autotranslate --git --locale ${{ github.event.inputs.locale | |
}} | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |