File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,19 @@ set -Eeuo pipefail
1515book_lang=${1:? " Usage: $0 <book-lang> <dest-dir>" }
1616dest_dir=${2:? " Usage: $0 <book-lang> <dest-dir>" }
1717
18+ # ensure source dir exists
19+ mkdir -p source
20+ # clean previous build artifacts
21+ SOURCE_DIR=" source/${book_lang} "
22+ rm -rf " $SOURCE_DIR "
23+ mkdir " $SOURCE_DIR "
24+
25+ # clone the current state into the source directory
26+ git clone . " $SOURCE_DIR "
27+
28+ # now work from that new directory as the base directory
29+ cd " $SOURCE_DIR "
30+
1831if [ " $book_lang " = " en" ]; then
1932 echo " ::group::Building English course"
2033else
Original file line number Diff line number Diff line change @@ -53,12 +53,10 @@ jobs:
5353 run : .github/workflows/build.sh en book
5454
5555 - name : Build all translations
56+ # note: build.sh here uses the given book path relative to source/{language}
5657 run : |
57- for po_lang in ${{ env.LANGUAGES }}; do
58- .github/workflows/build.sh $po_lang book/$po_lang
59- mv book/$po_lang/html book/html/$po_lang
60- done
61-
58+ parallel -i .github/workflows/build.sh {} book/{} -- ${{ env.LANGUAGES }}
59+ parallel -i mv source/{}/book/{}/html book/html/{} -- ${{ env.LANGUAGES }}
6260 - name : Build translation report
6361 run : i18n-report report book/html/translation-report.html po/*.po
6462
You can’t perform that action at this time.
0 commit comments