Keep translations in sync automatically on every push or pull request.
# .github/workflows/translate.yml
uses: Shipi18n/shipi18n-github-action@v2Add your key under Settings → Secrets and variables → Actions as ANTHROPIC_API_KEY, then reference it in the workflow. The action needs contents: write to commit, or pull-requests: write to open a PR.
uses: Shipi18n/shipi18n-github-action@v2name: Translate
on:
push:
branches: [main]
paths: ['locales/en.json']
permissions:
contents: write
jobs:
translate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Shipi18n/shipi18n-github-action@v2
with:
source-file: locales/en.json
target-languages: es,fr,de
provider: anthropic
api-key: ${{ secrets.ANTHROPIC_API_KEY }} - uses: Shipi18n/shipi18n-github-action@v2
with:
source-file: locales/en.json
target-languages: es,fr
api-key: ${{ secrets.ANTHROPIC_API_KEY }}
create-pr: 'true'
branch-name: shipi18n-translations - uses: Shipi18n/shipi18n-github-action@v2
with:
source-file: locales/en.json
target-languages: es,fr
api-key: ${{ secrets.ANTHROPIC_API_KEY }}
skip-keys: 'legal.*,brand.name'Add permissions: contents: write to the job (or pull-requests: write when using create-pr).
Incremental mode is on by default, so unchanged keys are skipped. Set incremental: false to force a full re-translation.
Pass api-key from a repository secret, or set ANTHROPIC_API_KEY in the job env. The action has no key of its own.
Need help? Read the docs