Skip to content

Relocate input module section (#124) #11

Relocate input module section (#124)

Relocate input module section (#124) #11

name: push-translations
# Only run this when the main branch changes a markdown file or a top level config file
on:
push:
branches:
- master
paths:
- 'internal_use/docs/source/**.md'
- 'internal_use/docs/source/**.yml'
- '.github/workflows/push-translations.yml'
permissions:
contents: write
pull-requests: 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 sphinx-intl myst-parser
# Update the files
- name: Update the files
run: |
sphinx-build -b gettext internal_use/docs/source internal_use/docs/_build/gettext
- name: Push translations to a branch (branch protection)
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git checkout -b auto_translation
git add "**.pot"
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"