GitHub Action
Automate the download of translation files from Locize in your CI/CD workflow using our official GitHub Action. This helps keep your translations up to date with every build or deployment.
Why Use the Locize GitHub Action?
- Automatically fetch the latest translations from Locize during your CI/CD pipeline.
- Ensure your app always ships with the most current localization data.
- Integrate seamlessly with other GitHub Actions for a complete workflow.
How to Use
- Add the Locize Download GitHub Action to your workflow.
- Provide your Locize project ID (recommended: store as a secret).
uses: locize/download@v3
with:
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}Note: The action downloads translations into the CI/CD container. To store them back in your repository, add a commit/push step (e.g., GitHub Commit Push Action).
Example Workflow
jobs:
my_job:
runs-on: ubuntu-latest
name: download and push
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download translations
uses: locize/download@v3
with:
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}Best Practices
- Store your Locize project ID and API keys as GitHub secrets for security.
- Combine with other actions to automate deployment, testing, or publishing.
- Review the Locize Download Action documentation for advanced options.