blob: e461707994238c1da6d09fa0e70ee629461f8e20 (
plain)
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
57
58
59
60
61
62
63
64
|
name: "translation: generate, upload, download"
on:
workflow_dispatch:
schedule:
# 06:00 UTC on Monday
- cron: '0 6 * * 1'
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set Up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: install lxml dependencies
run: |
sudo apt update
sudo apt install -y libxml2-dev libxslt-dev python-dev
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build Documentation
run: |
cd docs
make gettext
cd ..
- name: upload pot files
uses: localazy/upload@v1
with:
read_key: ${{ secrets.LOCALAZY_READ_KEY }}
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
- name: download translation files
uses: localazy/download@v1
with:
read_key: ${{ secrets.LOCALAZY_READ_KEY }}
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
- name: set file ownership
run: |
sudo chown -R 1001 docs/_locale
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
add-paths: docs/_locale/*
commit-message: "Github: update translations"
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: "Github: update translations"
body: |
Generate, upload new and download translation files
branch: update-translations-master
delete-branch: true
|