Skip to content

Simplify submodule command in ci.yml #28

Simplify submodule command in ci.yml

Simplify submodule command in ci.yml #28

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
submodules: true
- name: Update submodule
run: |
git submodule update --init --remote
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3'
cache: 'pip'
cache-dependency-path: |
requirements.txt
peps/requirements.txt
- name: Install gettext
run: |
sudo apt update -y && sudo apt install gettext -y
- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install -r requirements.txt -r peps/requirements.txt
- name: Generate POT files
run: |
sphinx-build -E -b gettext -D gettext_compact=0 -d peps/build/.doctrees-gettext . locales/pot
- name: Add/Update message catalog files
run: |
sphinx-intl update -d locales
- name: powrap
run: |
powrap --modified
- name: Commit and push changes
if: ${{ github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update translations"
file_pattern: .gitmodules locales/**/*.po
add_options: '-A'