Skip to content

feat: add full-sync option for manual workflow trigger #11

feat: add full-sync option for manual workflow trigger

feat: add full-sync option for manual workflow trigger #11

Workflow file for this run

name: Auto Translate
on:
push:
branches: [main]
paths:
- 'locales/en/**'
workflow_dispatch:
inputs:
full-sync:
description: 'Force full re-translation (ignore incremental)'
required: false
default: 'false'
type: boolean
jobs:
translate:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # Need previous commit for incremental translation
- name: Translate all locale files
uses: Shipi18n/shipi18n-github-action@v1
with:
api-key: ${{ secrets.SHIPI18N_API_KEY }}
source-dir: 'locales/en'
target-languages: 'es,fr,de'
output-dir: 'locales'
create-pr: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
incremental: ${{ github.event.inputs.full-sync == 'true' && 'false' || 'true' }}