1
+ # python-docs-translations sample workflows, adapted to be contained in a single file
2
+ # For more information, see https://python-docs-transifex-automation.readthedocs.io/workflows.html
3
+ name : Test translation workflow
4
+
5
+ on :
6
+ schedule :
7
+ - cron : ' 0 0 * * *'
8
+ push :
9
+ branches :
10
+ - ' *'
11
+ workflow_dispatch :
12
+
13
+ jobs :
14
+ lint :
15
+ runs-on : ubuntu-latest
16
+ strategy :
17
+ fail-fast : false
18
+ matrix :
19
+ version : [ '3.14' ]
20
+ continue-on-error : true
21
+ steps :
22
+ - uses : actions/setup-python@master
23
+ with :
24
+ python-version : 3
25
+ - run : pip install sphinx-lint
26
+ - uses : actions/checkout@master
27
+ with :
28
+ ref : ${{ matrix.version }}
29
+ -
uses :
rffontenelle/[email protected]
30
+ - run : sphinx-lint
31
+
32
+ build-translation :
33
+ runs-on : ubuntu-latest
34
+ strategy :
35
+ fail-fast : false
36
+ matrix :
37
+ version : [ '3.14' ]
38
+ format : [ html, latex ]
39
+ steps :
40
+ - uses : actions/setup-python@master
41
+ with :
42
+ python-version : 3.12 # pinned for Sphinx 3.4.3 to build 3.10
43
+ - uses : actions/checkout@master
44
+ with :
45
+ repository : python/cpython
46
+ ref : ${{ matrix.version }}
47
+ - run : make venv
48
+ working-directory : ./Doc
49
+ - uses : actions/checkout@master
50
+ with :
51
+ ref : ${{ matrix.version }}
52
+ path : Doc/locales/ro/LC_MESSAGES
53
+ - run : git pull
54
+ working-directory : ./Doc/locales/ro/LC_MESSAGES
55
+ -
uses :
sphinx-doc/[email protected]
56
+ - run : make -e SPHINXOPTS="--color -D language='ro' -W --keep-going" ${{ matrix.format }}
57
+ working-directory : ./Doc
58
+ - uses : actions/upload-artifact@master
59
+ if : success() || failure()
60
+ with :
61
+ name : build-${{ matrix.version }}-${{ matrix.format }}
62
+ path : Doc/build/${{ matrix.format }}
63
+
64
+ output-pdf :
65
+ runs-on : ubuntu-latest
66
+ strategy :
67
+ matrix :
68
+ version : [ '3.14' ]
69
+ needs : [ 'build-translation' ]
70
+ steps :
71
+ - uses : actions/download-artifact@master
72
+ with :
73
+ name : build-${{ matrix.version }}-latex
74
+ - run : sudo apt-get update
75
+ - run : sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy
76
+ - run : make
77
+ - uses : actions/upload-artifact@master
78
+ with :
79
+ name : build-${{ matrix.version }}-pdf
80
+ path : .
0 commit comments