Skip to content

translation: generate, upload, download #84

translation: generate, upload, download

translation: generate, upload, download #84

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@v4
with:
python-version: 3.11.x
- name: install lxml dependencies
run: |
sudo apt update
sudo apt install -y libxml2-dev libxslt-dev python3-lxml
- 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@v6
with:
token: ${{ secrets.PR_ACTION_DOCUMENTATION_SUBMODULE_UPDATE }}
commit-message: "Github: update translations"
title: "Github: update translations"
body: |
Generate, upload new and download translation files
branch: update-translations-current
delete-branch: true