Add CI to test Hugo build with translated documentation
What does this MR do?
We'd like to have some testing to make sure that localization files don't break Hugo builds. This MR extends the docs:check Hugo build job to run the full i18n Hugo build using the new environment --test configuration, which automatically includes both English and localized content. This is essentially the same as !5306 (merged), but with additional commands to enable the Japanese site and run on the source Japanese markdown files.
Sister MR's doing the same thing:
The updated job now:
- Runs
docs:check Hugo buildto use the comprehensive test configuration - Tests index pages for both
/docand/doc-localedirectories - Removes the manual file copying steps (handled by the test config)
- Here's a demonstration of the job correctly identifying malformed shortcodes in localized content:
- https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/11252438451
Why was this MR needed?
So we have CI inplace that verifies the content in /doc-locale will work on docs.gitlab.com
What's the best way to test this MR?
Make a change to any file in /doc or /doc-locale that will break the Hugo build. The docs:check Hugo build CI will be triggered because of the change, and then fail when it detects the offense.
What are the relevant issue numbers?
Related gitlab-com/localization/docs-site-localization#337 (closed)