ci: create crowdin action (#2437)

This commit is contained in:
Luffy 2024-05-30 09:37:22 +08:00 committed by GitHub
parent 15ed3b76b0
commit a539808761
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 40 additions and 1 deletions

9
.github/crowdin/crowdin-push.yml vendored Normal file
View File

@ -0,0 +1,9 @@
files:
- source: /*.md
translation: /%two_letters_code%/%original_file_name%
ignore:
- '/_coverpage.md'
- '/_navbar.md'
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN

30
.github/workflows/crowdin.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Crowdin Action
on:
workflow_dispatch:
push:
paths:
- 'docs/**.md'
branches: [develop, master]
jobs:
crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin push
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: false
download_translations: false
push_translations: false
config: '.github/crowdin/crowdin-push.yml'
crowdin_branch_name: ${{ github.ref_name }}
base_path: ${{ github.workspace }}/docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@ -1,4 +1,4 @@
/* eslint-disable */
// =============================================================================
// DO NOT EDIT: This file is auto-generated by an /build/emoji.js