Skip to content

Commit 7b7ce9d

Browse files
workflow: add automation of uploading source text to Crowdin
This will push to Crowdin if a push to main branch was successful. This allows automation of syncing source text, making it less of a hassle to synchronize all translations.
1 parent fb72097 commit 7b7ce9d

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Upload source files to Crowdin
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- 'docs/**.md'
8+
- 'docs/_include/**.md'
9+
- 'docs/.vitepress/i18n/strings/en_US.json'
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
20+
submodules: recursive
21+
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: npm
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
# This makes sure that the site actually builds before pushing to Crowdin
32+
- name: Build site
33+
run: npm run docs:build
34+
35+
- name: Push to Crowdin
36+
uses: crowdin/github-action@v2
37+
with:
38+
upload_sources: true
39+
upload_translations: false
40+
download_translations: false
41+
crowdin_branch_name: ${{ env.BRANCH_NAME }}
42+
env:
43+
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}

0 commit comments

Comments
 (0)