Skip to content

Update Resources.md #11

Update Resources.md

Update Resources.md #11

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
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 -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"