GitHub Action Setup
Automatically translate your locale files whenever you push changes to your repository.
Quick Setup
Create a workflow file at .github/workflows/translate.yml:
name: Translate
on:
push:
paths:
- 'locales/en/**'
workflow_dispatch:
permissions:
contents: write
jobs:
translate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Translate
uses: Shipi18n/shipi18n-github-action@v1
with:
api-key: ${{ secrets.ANTHROPIC_API_KEY }}
source-dir: locales/en
target-languages: es,fr,de
github-token: ${{ secrets.GITHUB_TOKEN }}Add Your API Key Secret
- Go to your repository on GitHub
- Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
ANTHROPIC_API_KEY - Value: your own Anthropic API key (or
OPENAI_API_KEYwithprovider: openai)
Trigger Options
The workflow above triggers on:
- Push: Automatically when files in
locales/en/change - Manual: Via the "Actions" tab or the workflow_dispatch trigger