-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
06d8a17
commit e1fa83f
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Upload source files to Crowdin | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- 'docs/**.md' | ||
- 'docs/_include/**.md' | ||
- 'docs/.vitepress/i18n/strings/en_US.json' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
# This makes sure that the site actually builds before pushing to Crowdin | ||
- name: Build site | ||
run: npm run docs:build | ||
|
||
- name: Push to Crowdin | ||
uses: crowdin/github-action@v2 | ||
with: | ||
upload_sources: true | ||
env: | ||
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }} |