Caratteristica

Publish Pipeline: CDN & GitHub Deployment

Publish Pipeline: CDN & GitHub Deployment

better-i18n separates editing from deployment. You create and update translations freely — nothing goes live until you explicitly publish. When you do, changes deploy to your CDN endpoint and/or GitHub repository as a tracked sync job.

This page covers how the publish pipeline works, what you can monitor, and how to integrate publishing into your workflow.


How Publishing Works

1. Preview Pending Changes

Before publishing, review exactly what will deploy:

// MCP tool: getPendingChanges
{
  "project": "your-org/your-project"
}

Returns:

  • hasPendingChanges — Whether anything is queued
  • summary — Translation counts, deleted keys, total changes
  • byLanguage — Breakdown per language code
  • deletedKeys — Keys that will be permanently removed
  • publishDestination"github", "cdn", or "none"

2. Publish

Deploy all pending changes or specific translations:

// MCP tool: publishTranslations
{
  "project": "your-org/your-project"
}

// Or publish specific translations
{
  "project": "your-org/your-project",
  "translations": [
    { "keyId": "uuid-1", "languageCode": "tr" },
    { "keyId": "uuid-2", "languageCode": "de" }
  ]
}

Publishing is async — it returns sync job IDs immediately.

3. Track Deployment

Monitor sync job progress:

// MCP tool: getSync
{
  "project": "your-org/your-project",
  "syncId": "sync-job-uuid"
}

Returns status (pending, in_progress, completed, failed), timestamps, logs, and affected keys.


Publish Destinations

CDN Deployment

Translations deploy to Cloudflare's edge network:

https://cdn.better-i18n.com/{org}/{project}/{locale}/{namespace}.json

Your application fetches translations from this endpoint. Updates are live within seconds of a successful publish — no app redeployment needed.

GitHub Deployment

If you've connected a GitHub repository, publishing creates a pull request or pushes directly to your configured branch. Translation files are updated in the patterns you've configured (e.g., locales/**/*.json).

  • You control the merge — better-i18n creates the PR, your team reviews and merges
  • Only configured file patterns are touched
  • Full commit history of every translation change

Sync Job Types

TypeWhat It Does
initial_importFirst sync when connecting a repository
source_syncSync triggered by a GitHub push event
cdn_uploadDeploy translations to CDN
batch_publishPublish multiple translations at once

List recent sync operations:

// MCP tool: getSyncs
{
  "project": "your-org/your-project",
  "limit": 10,
  "status": "completed"
}

GitHub Webhook Integration

better-i18n receives GitHub push events via webhooks to trigger automatic sync:

  1. You push code with updated translation files
  2. GitHub sends a webhook to better-i18n
  3. better-i18n syncs the changes into your project
  4. Translations update in the dashboard

This keeps your cloud project in sync with your repository without manual intervention.


REST API Publishing

The same publish workflow is available via the REST API at dash.better-i18n.com/api:

# List pending changes
curl -H "Authorization: Bearer $API_KEY" \
  https://dash.better-i18n.com/api/projects/your-org/your-project/pending-changes

# Publish all pending changes
curl -X POST -H "Authorization: Bearer $API_KEY" \
  https://dash.better-i18n.com/api/projects/your-org/your-project/publish

Integrate publishing into your CI/CD pipeline — deploy translations as part of your release process.


MCP Workflow

With the MCP server, your AI assistant handles the full publish cycle:

"Check what's pending for the landing project, then publish all Turkish translations."

The AI calls getPendingChanges, shows you the summary, and calls publishTranslations with your confirmation. Track completion with getSyncs.


Best Practices

  1. Always preview first — Call getPendingChanges before every publish
  2. Publish incrementally — Deploy specific languages or keys rather than everything at once
  3. Track completions — Use getSync to verify jobs finished successfully
  4. Automate with CI — Add publish steps to your release pipeline via REST API
  5. Use GitHub PRs — Let your team review translation changes before they merge

The publish pipeline gives you full control over when and how translations reach your users. Nothing deploys without your explicit action.