55 - cron : ' 0 6 * * *'
66 push :
77 branches : ['main']
8+ pull_request :
9+ branches : ['main']
810 workflow_dispatch :
911
1012jobs :
13+
1114 update-translation :
1215 runs-on : ubuntu-latest
1316 strategy :
14- fail-fast : false
1517 matrix :
1618 version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
1719 steps :
@@ -20,48 +22,74 @@ jobs:
2022 access_token : ${{ secrets.GITHUB_TOKEN }}
2123 - uses : actions/setup-python@master
2224 with :
23- python-version : 3
24- - run : sudo apt-get install -y gettext
25+ python-version : ' 3.12'
26+ - run : sudo apt-get install -y gettext rsync
27+ - run : pip install transifex-python six sphinx-intl blurb
2528 - run : curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
2629 working-directory : /usr/local/bin
27- - run : pip install requests cogapp polib transifex-python sphinx-lint sphinx-intl blurb six
2830 - uses : actions/checkout@master
2931 with :
30- ref : ${{ matrix.version }}
31- - run : .github/scripts/manage_translation.py recreate_config
32+ repository : python/cpython
33+ ref : main
34+ - run : make gettext
35+ working-directory : ./Doc
36+ - run : sphinx-intl create-txconfig
37+ working-directory : ./Doc/build
38+ - run : sphinx-intl update-txconfig-resources --transifex-organization-name python-doc --transifex-project-name python-newest -d . -p gettext
39+ working-directory : ./Doc/build
3240 env :
3341 TX_TOKEN : ${{ secrets.TX_TOKEN }}
34- - run : .github/scripts/manage_translation.py fetch_translations
42+ - run : tx pull -l uk --force --skip
43+ working-directory : ./Doc/build
3544 env :
3645 TX_TOKEN : ${{ secrets.TX_TOKEN }}
37- - run : git config --local user.email github-actions@github.com
38- - run : git config --local user.name "GitHub Action's update-translation job"
39- - run : git add .
40- - run : git commit -m 'Update translation from Transifex' || true
46+ - run : find -name "*.po" -exec msgcat --no-location -o {} {} \;
47+ working-directory : ./Doc/build
48+ - uses : actions/checkout@master
49+ with :
50+ ref : ${{ matrix.version }}
51+ path : ./Doc/build/uk/LC_MESSAGES
52+ - run : |
53+ git config --local user.email github-actions@github.com
54+ git config --local user.name "GitHub Action's update-translation job"
55+ git add -f .
56+ git commit -m 'Update translation from Transifex' || true
57+ working-directory: ./Doc/build/uk/LC_MESSAGES
4158 - uses : ad-m/github-push-action@master
4259 with :
4360 branch : ${{ matrix.version }}
4461 github_token : ${{ secrets.GITHUB_TOKEN }}
45- - uses : peter-evans/repository-dispatch@main
62+ directory : ./Doc/build/uk/LC_MESSAGES
63+
64+ lint-translation :
65+ runs-on : ubuntu-latest
66+ strategy :
67+ matrix :
68+ version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
69+ needs : ['update-translation']
70+ continue-on-error : true
71+ steps :
72+ - uses : actions/setup-python@master
4673 with :
47- python-version : 3
74+ python-version : ' 3.12'
75+ - run : pip install sphinx-lint
4876 - uses : actions/checkout@master
4977 with :
5078 ref : ${{ matrix.version }}
5179 - uses : rffontenelle/sphinx-lint-problem-matcher@v1.0.0
5280 - run : sphinx-lint
81+
5382 build-translation :
5483 runs-on : ubuntu-latest
5584 strategy :
56- fail-fast : false
5785 matrix :
5886 version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
5987 format : [html, latex]
6088 needs : ['update-translation']
6189 steps :
6290 - uses : actions/setup-python@master
6391 with :
64- python-version : 3.12 # pin for Sphinx 3.4.3 in 3.10 branch (see #63)
92+ python-version : ' 3.12'
6593 - uses : actions/checkout@master
6694 with :
6795 repository : python/cpython
@@ -75,16 +103,17 @@ jobs:
75103 - run : git pull
76104 working-directory : ./Doc/locales/uk/LC_MESSAGES
77105 - uses : sphinx-doc/github-problem-matcher@v1.1
78- - run : make -e SPHINXOPTS=" -D language='uk' -W --keep-going" ${{ matrix.format }}
106+ - run : make -e SPHINXOPTS="-D language='uk' -D gettext_compact=0 --keep-going --color" SPHINXERRORHANDLING=" " ${{ matrix.format }}
79107 working-directory : ./Doc
80108 - uses : actions/upload-artifact@master
109+ if : success() || failure()
81110 with :
82111 name : build-${{ matrix.version }}-${{ matrix.format }}
83112 path : Doc/build/${{ matrix.format }}
113+
84114 output-pdf :
85115 runs-on : ubuntu-latest
86116 strategy :
87- fail-fast : false
88117 matrix :
89118 version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
90119 needs : ['build-translation']
94123 name : build-${{ matrix.version }}-latex
95124 - run : sudo apt-get update
96125 - run : sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy
97- - run : make -i
126+ - run : make
98127 - uses : actions/upload-artifact@master
99128 with :
100129 name : build-${{ matrix.version }}-pdf
0 commit comments