-
Notifications
You must be signed in to change notification settings - Fork 11
35 lines (30 loc) · 1.24 KB
/
crowdin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Crowdin Sync
on:
push:
branches:
- main # Adjust the branch as needed
- feature/i18n
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install unzip utility
run: sudo apt-get install unzip
- name: Install Crowdin CLI
run: |
curl -s https://downloads.crowdin.com/cli/v3/crowdin-cli.zip -o crowdin-cli.zip
unzip crowdin-cli.zip -d crowdin-cli
sudo mv crowdin-cli/3.15.0/crowdin /usr/local/bin/
sudo mv crowdin-cli/3.15.0/crowdin-cli.jar /usr/local/bin/ # Move the jar file to the same location
sudo chmod +x /usr/local/bin/crowdin # Make the binary executable
- name: Crowdin Sync
run: |
crowdin upload sources \
--project-id 683600 \
--token ${{ secrets.CROWDIN_API_TOKEN }} \
--preserve-hierarchy true \
--files 'i18n/en/**/*:/i18n/%two_letters_code%/**/%original_file_name%' \
--files 'docs/**/*:/i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%' \
--files 'changelog/**/*:/i18n/%two_letters_code%/docusaurus-plugin-content-blog-changelog/**/%original_file_name%'