-
Notifications
You must be signed in to change notification settings - Fork 24
56 lines (48 loc) · 1.67 KB
/
push-translation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Push translation sources
on:
pull_request:
paths:
- 'doc/**/*'
jobs:
push-translation-sources:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set branch name from source branch
run: echo "BRANCH_NAME=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV
- name: Start translation service deployment
uses: bobheadxi/deployments@v1.4.0
id: translation
with:
step: start
token: ${{secrets.GITHUB_TOKEN}}
env: translation-${{env.BRANCH_NAME}}
ref: ${{github.head_ref}}
- name: Setup Python environment
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Setup Python requirements
run: |
python -m pip install --upgrade pip
pip install -r doc/requirements.txt
- name: Build pot files
run: python -m sphinx . doc/locale/en -c doc -b gettext
- name: Push POT files to crowdin
uses: crowdin/github-action@1.0.21
with:
upload_sources: true
upload_translations: false
crowdin_branch_name: ${{env.BRANCH_NAME}}
config: 'doc/crowdin.yaml'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
CROWDIN_PERSONAL_TOKEN: ${{secrets.CROWDIN_PERSONAL_TOKEN}}
- name: update deployment status
uses: bobheadxi/deployments@v1.4.0
with:
step: finish
token: ${{secrets.GITHUB_TOKEN}}
status: ${{job.status}}
deployment_id: ${{steps.translation.outputs.deployment_id}}
env_url: https://crowdin.com/project/tarantool-metrics-docs/ru#/${{env.BRANCH_NAME}}