Skip to content

Initial commit

Initial commit #2

Workflow file for this run

name: Translate README
on:
push:
branches:
- master
paths:
- 'README_de.md'
permissions:
contents: write
jobs:
translate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade googletrans==3.1.0a0
curl -o translate-md.py https://raw.githubusercontent.com/dbt1/translate-md/refs/heads/master/translate-md.py
chmod 755 translate-md.py
curl -o translate-md-config.json https://raw.githubusercontent.com/dbt1/translate-md/refs/heads/master/translate-md-config.json.sample
ls -l
- name: Translate README
run: |
cp README_de.md template.md
python translate-md.py --template-md template.md --output-dir . --prefix README_ --main-doc README.md -c translate-md-config.json -s de
rm template.md
- name: Commit and push translated README
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add README*.md
git commit -m "readme: Automatically translated README"
git push