lingo ci runs the localization pipeline inside a CI job and gets the results back into your repo — either by committing to the branch or opening a pull request. It auto-detects the platform (GitHub Actions, GitLab CI, Bitbucket Pipelines) and configures git identity, remote, and branch for you.
Basic usage#
lingo ciBy default it runs the translation step, then commits any new translations straight to the current branch.
Choosing the step#
--step picks which command runs as the translation step (default localize). For the push/pull file workflow, use push:
lingo ci --step pushAllowed steps: localize, ship, push, extract.
Commit vs. pull request#
Commit to the branch (default), or open/update a PR from a dedicated lingo.dev/* branch:
lingo ci --step push --pull-requestUseful flags:
| Flag | Effect |
|---|---|
--pull-request | Open/update a PR instead of committing to the base branch. |
--commit-message <msg> | Commit message. Default: feat: update translations via @lingodotdev. |
--pull-request-title <title> | PR title. |
--commit-author-name / --commit-author-email | Git author. Defaults to Lingo.dev / support@lingo.dev. |
--working-directory <dir> | cd into a subdirectory first — for monorepos. |
--gpg-sign | Sign the commit with the configured GPG key. |
--process-own-commits | Don't skip the run when the last commit was already authored by Lingo.dev. |
GitHub Actions example#
Authenticate with an API key (lingo login --api-key, or set it as a secret) and run on every merge to the default branch:
name: Translate
on:
push:
branches: [main]
jobs:
localize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx @lingo.dev/cli@latest ci --step push --pull-request
env:
LINGO_API_KEY: ${{ secrets.LINGO_API_KEY }}This translates new and changed source on every push to main and opens a PR with the results for review.
