---
title: "Overview"
description: "Use the diglot GitHub Action to translate what changed in your sources and commit the records."
canonical_url: "https://diglot.sh/workflow/action/overview"
---
# Overview

> Use the diglot GitHub Action to translate what changed in your sources and commit the records.

`@diglot/action` is a GitHub Action for translations repositories. On each run it extracts every source, finds what changed since the last run, drafts translations for the locales that have machine translation enabled, rebuilds the bundles and commits the result as a single commit. It never pushes, so you stay in control of where the commit goes.

<package-info directory="packages/action" install="uses: danielroe/diglot/packages/action@main" name="@diglot/action">



</package-info>

```yaml
- uses: actions/checkout@v4
- id: diglot
  uses: danielroe/diglot/packages/action@main
  with:
    git-user-name: translations-bot
    git-user-email: translations-bot@users.noreply.github.com
  env:
    AI_GATEWAY_API_KEY: ${{ secrets.AI_GATEWAY_API_KEY }}
- if: steps.diglot.outputs.committed == 'true'
  run: git pull --rebase origin ${{ github.ref_name }} && git push
  env:
    GIT_COMMITTER_NAME: translations-bot
    GIT_COMMITTER_EMAIL: translations-bot@users.noreply.github.com
```

The Action commits to the branch that is checked out. Pushing is a separate step in your workflow, which is why the job needs `contents: write` permission and no other token.

## When a run does nothing

A run with no source changes makes no model calls and no commit. That makes it safe to schedule daily, and cheap: the daily run in the [Nuxt example](https://diglot.sh/guide/examples/nuxt-translations) exists only to catch changes that a push trigger missed.

## Where to go next

- [Set up the Action](https://diglot.sh/workflow/action/setup) covers the secret, the permissions and the triggers.
- [How a run works](https://diglot.sh/workflow/action/how-a-run-works) explains each decision the Action makes.
- [Inputs and outputs](https://diglot.sh/workflow/action/inputs-and-outputs) lists every option and result.
- [Rejected and skipped segments](https://diglot.sh/workflow/action/rejected-and-skipped) explains what happens when a translation fails QA or a reviewer rejects it.
- [Use it as a library](https://diglot.sh/workflow/action/library) shows how to call a run from your own script.


## Sitemap

See the full [sitemap](https://diglot.sh/sitemap.md) for all pages.
