Skip to content

Commit b8052df

Browse files
committed
Adjust translation build on CI
1 parent c84e386 commit b8052df

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/rbe.yml

+8-11
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,22 @@ jobs:
5555
- name: Build all translations
5656
run: |
5757
for po_lang in ${{ env.LANGUAGES }}; do
58-
POT_CREATION_DATE=$(grep --max-count 1 '^"POT-Creation-Date:' po/$po_lang.po | sed -E 's/".*: (.*)\\n"/\1/')
59-
if [[ $POT_CREATION_DATE == "" ]]; then
60-
POT_CREATION_DATE=now
61-
fi
62-
63-
echo "::group::Building $po_lang translation as of $POT_CREATION_DATE"
64-
rm -r src/
65-
git restore --source "$(git rev-list -n 1 --before "$POT_CREATION_DATE" @)" src/
66-
58+
echo "::group::Building $po_lang translation"
6759
# Set language and adjust site URL. Clear the redirects
6860
# since they are in sync with the source files, not the
6961
# translation.
7062
MDBOOK_BOOK__LANGUAGE=$po_lang \
71-
MDBOOK_OUTPUT__HTML__SITE_URL=/rust-by-example/$po_lang/ \
72-
MDBOOK_OUTPUT__HTML__REDIRECT='{}' \
7363
mdbook build -d book/$po_lang
7464
echo "::endgroup::"
7565
done
7666
67+
- name: Check all translations for broken links
68+
run: |
69+
for po_lang in ${{ env.LANGUAGES }}; do
70+
MDBOOK_BOOK__LANGUAGE=$po_lang \
71+
sh linkcheck.sh --all rust-by-example
72+
done
73+
7774
- name: Upload Artifact
7875
uses: actions/upload-artifact@v3
7976
with:

0 commit comments

Comments
 (0)