Solves deprecate nodejs usage by actions in ci.yml #30
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: 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 -bgettext -Dgettext_compact=0 -d peps/build/.doctrees-gettext peps/peps 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@v5 | |
with: | |
commit_message: "Update translations" | |
file_pattern: .gitmodules locales/**/*.po | |
add_options: '-A' |