Add links to COBA and BINA #10
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-translations | |
# Only run this when the main branch changes a markdown file or a top level config file | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.md' | |
- '_*.yml' | |
permissions: | |
contents: write | |
jobs: | |
push-translations: | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Install dependencies | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -r intl_requirements.txt | |
# Update the files | |
- name: Update the files | |
run: | | |
jb config sphinx . | |
sphinx-build -b gettext . _build/gettext | |
sphinx-intl update -p _build/gettext | |
rm conf.py | |
- name: Push translations to a branch (branch protection) | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git checkout -b auto_translation | |
git add . | |
git commit -m "auto generated translation file updates" | |
git push -u origin auto_translation | |
gh pr create --title "Auto-translations" --body "Made by GH Actions" |