[451] Refactoring metrics docs #225
Workflow file for this run
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
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/[email protected] | |
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/[email protected] | |
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/[email protected] | |
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}} |