Until now, keeping your translation files in sync between your GitHub repository and WebTranslateIt required running wti pull and wti push manually, or setting up custom CI scripts. Today, we’re releasing an official GitHub Action that automates the entire workflow.
What it does
The WebTranslateIt Sync Action (repo: https://github.com/webtranslateit/github-action) plugs directly into your existing setup. It reads the .wti configuration file you already have in your repository and uses the official wti CLI under the hood. No new config format to learn.
In a nutshell, the action:
- Pushes your source language files to WebTranslateIt so translators always work on the latest strings.
- Pulls the latest translations back into your repository.
- Opens a pull request with the updated translation files, ready for you to review and merge.
Setup in 5 minutes
Step 1: Store your API key as a GitHub secret
You’ll find your project API key in your WebTranslateIt project settings. Add it as a secret in your GitHub repository:
- Go to your repository on GitHub.
- Navigate to Settings → Secrets and variables → Actions.
- Click New repository secret.
- Name it
WTI_API_KEYand paste your project API key.
Step 2: Make sure you have a .wti file
If you’ve been using the wti CLI locally, you already have one at the root of your repo (created by wti init). If not, install the gem and run:
gem install web_translate_it
wti init
You can safely remove the api_key line from the .wti file since the action will read it from the GitHub secret instead.
Step 3: Create the workflow file
Create .github/workflows/wti-sync.yml in your repository:
name: WTI Sync
on:
push:
branches: [main]
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: webtranslateit/github-action@v1
with:
api_key: ${{ secrets.WTI_API_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
That’s it. Every time you push to main, the action will upload your source files and pull the latest translations. If anything changed, it opens a pull request on a dedicated l10n_wti_translations branch.
Common recipes
Upload source files only (no download)
Useful when you just want to keep WebTranslateIt up to date as your code changes:
- uses: webtranslateit/github-action@v1
with:
api_key: ${{ secrets.WTI_API_KEY }}
upload_sources: true
download_translations: false
Download translations on a schedule
Pull translations every 6 hours without waiting for a push:
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
Pull only specific locales
- uses: webtranslateit/github-action@v1
with:
api_key: ${{ secrets.WTI_API_KEY }}
upload_sources: false
pull_options: '--locale fr'
Safe push with merge
Avoid obsoleting keys that are missing from your source file:
- uses: webtranslateit/github-action@v1
with:
api_key: ${{ secrets.WTI_API_KEY }}
push_options: '--merge --ignore-missing --minor'
How it works under the hood
The action runs inside a Docker container with the wti Ruby gem pre-installed. It reads your .wti config file — including any ignore_locales, needed_locales, or ignore_files settings — so behavior is identical to running wti on your local machine. Translation changes are committed on a dedicated branch and a pull request is created or updated automatically.
Your API key is masked in all logs and never appears in commits.
Get started
Check out the full documentation and more examples on GitHub. The action is available on the GitHub Marketplace — search for “WebTranslateIt Sync” or add webtranslateit/github-action@v1 to your workflow.
We’d love to hear your feedback. If you run into any issues, open an issue on GitHub.