@@ -28,12 +28,12 @@ jobs:
2828 uses : actions/checkout@v4
2929 with :
3030 fetch-depth : 0
31-
31+
3232 - name : Configure Git
3333 run : |
3434 git config user.name "github-actions[bot]"
3535 git config user.email "github-actions[bot]@users.noreply.github.com"
36-
36+
3737 - name : Check if translation branch exists
3838 id : check-branch
3939 run : |
4242 else
4343 echo "exists=false" >> $GITHUB_OUTPUT
4444 fi
45-
45+
4646 - name : Setup and rebase translation branch
4747 run : |
4848 if [ "${{ steps.check-branch.outputs.exists }}" = "true" ]; then
@@ -67,37 +67,37 @@ jobs:
6767 needs : setup-branch
6868 strategy :
6969 matrix :
70- language : [ja] # Add more languages here as needed
70+ language : [ja] # Add more languages here as needed
7171
7272 steps :
7373 - name : Check out rebased translation branch
7474 uses : actions/checkout@v4
7575 with :
7676 ref : automated-translations
77-
77+
7878 - name : Use Node.js
7979 uses : actions/setup-node@v4
8080 with :
8181 node-version : 20
82-
82+
8383 - name : Get AWS credentials
8484 uses : aws-actions/configure-aws-credentials@v4.2.1
8585 with :
8686 role-to-assume : ${{ secrets.INFERENCE_AWS_ROLE_ARN }}
8787 role-duration-seconds : 1800
8888 aws-region : ${{ secrets.AWS_REGION }}
8989 role-session-name : GithubActionsSession-translate-${{ matrix.language }}
90-
90+
9191 - name : Install dependencies
9292 run : yarn install
93-
93+
9494 - name : Run translate for ${{ matrix.language }}
9595 run : |
9696 yarn toolkit-md translate \
9797 --translation-dir website/i18n/${{ matrix.language }}/docusaurus-plugin-content-docs/current \
9898 --to ${{ matrix.language }} \
99- --write ./website/docs
100-
99+ --write .
100+
101101 - name : Upload translation artifacts
102102 uses : actions/upload-artifact@v4
103103 with :
@@ -115,17 +115,17 @@ jobs:
115115 uses : actions/checkout@v4
116116 with :
117117 ref : automated-translations
118-
118+
119119 - name : Configure Git
120120 run : |
121121 git config user.name "github-actions[bot]"
122122 git config user.email "github-actions[bot]@users.noreply.github.com"
123-
123+
124124 - name : Download all translation artifacts
125125 uses : actions/download-artifact@v4
126126 with :
127127 path : artifacts/
128-
128+
129129 - name : Apply all translations
130130 run : |
131131 # Copy all translation files from artifacts
@@ -141,7 +141,7 @@ jobs:
141141 cp -r "$lang_dir"* "website/i18n/$lang/"
142142 fi
143143 done
144-
144+
145145 - name : Commit changes
146146 run : |
147147 git add website/i18n/
@@ -156,12 +156,12 @@ jobs:
156156 - Workflow run: ${{ github.run_id }}"
157157 echo "has_changes=true" >> $GITHUB_ENV
158158 fi
159-
159+
160160 - name : Push translation branch
161161 if : env.has_changes == 'true'
162162 run : |
163163 git push origin automated-translations
164-
164+
165165 - name : Create Pull Request
166166 if : env.has_changes == 'true'
167167 uses : peter-evans/create-pull-request@v7
@@ -175,12 +175,12 @@ jobs:
175175 website/i18n/**/*.md
176176 body : |
177177 ## Automated Translation Updates
178-
178+
179179 This PR contains automated translation updates generated from the latest changes in `main`.
180-
180+
181181 ### Changes
182182 - Branch was rebased on latest `main` before translation
183183 - Translations generated from latest content
184184 - Previous translation work preserved through rebase
185-
185+
186186 Please review the translations before merging.
0 commit comments