Skip to content

Commit

Permalink
ci: create crowdin action
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed May 23, 2024
1 parent 4ae87bb commit cc4e542
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/crowdin/crowdin-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
files:
- source: /docs/*.md
translation: /docs/%two_letters_code%/%original_file_name%
ignore:
- '/docs/_coverpage.md'
- '/docs/_navbar.md'

project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
30 changes: 30 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Crowdin Action

on:
workflow_dispatch:
push:
paths:
- 'docs/**.md'
branches: [develop, master, main]

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 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

0 comments on commit cc4e542

Please sign in to comment.