[CI] checking additional languages
parent
7b92a3d3a9
commit
ae606d3b0b
|
@ -1,7 +1,32 @@
|
|||
name: Check Documentation Links
|
||||
name: Check Documentation Links
|
||||
|
||||
on: [push,pull_request]
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/linkcheck.yml'
|
||||
- 'doc/**'
|
||||
- 'locale/**'
|
||||
- 'CMakeLists.txt'
|
||||
|
||||
branches-ignore:
|
||||
- 'gh-pages'
|
||||
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/doc-check.yml'
|
||||
- 'doc/**'
|
||||
- 'locale/**'
|
||||
- 'CMakeLists.txt'
|
||||
|
||||
branches-ignore:
|
||||
- 'gh-pages'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
|
||||
jobs:
|
||||
|
@ -12,24 +37,30 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [de,en,es,fi,fr,hu,ja,it]
|
||||
language: [de,en,es,fi,fr,hu,ja,it,nl,pt,sv,tr,zh]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: get commit message
|
||||
- name: check modified files
|
||||
id: check_files
|
||||
run: |
|
||||
PROCESS=${{ false }}
|
||||
if [[ $(git log --format=%B -n 2 | tr -d "'" | tr -d " " | grep "\[${{ matrix.language }}\]") ]]; then
|
||||
PROCESS=${{ true }}
|
||||
fi
|
||||
if [[ "${{ matrix.language }}" == "en" ]]; then
|
||||
PROCESS=${{ true }}
|
||||
fi
|
||||
echo "PROCESS=${PROCESS}" >> $GITHUB_ENV
|
||||
|
||||
# allways processing english, no matter what the change was
|
||||
if [[ "${{ matrix.language }}" == "en" ]]; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi
|
||||
|
||||
# when this file changes all languages are tested
|
||||
if git diff --name-only HEAD^ HEAD | grep -q '.github/workflows/linkcheck.yml' ; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi
|
||||
|
||||
# when there is a change on the way the build is done all languages are tested
|
||||
if git diff --name-only HEAD^ HEAD | grep -q '^CMakeLists.txt' ; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi
|
||||
if git diff --name-only HEAD^ HEAD | grep -q '^doc/CMakeLists.txt' ; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi
|
||||
if git diff --name-only HEAD^ HEAD | grep -q '^doc/conf.py' ; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi
|
||||
|
||||
# if there is a change on the translation
|
||||
if git diff --name-only HEAD^ HEAD | grep -q "^locale/${{ matrix.language }}" ; then echo "PROCESS=true" >> $GITHUB_ENV; echo "CHK_LINK=true" >> $GITHUB_ENV; exit 0; fi
|
||||
|
||||
- name: Install python
|
||||
if: env.PROCESS == 'true'
|
||||
uses: actions/setup-python@v4
|
||||
|
@ -45,6 +76,7 @@ jobs:
|
|||
graphviz
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install Sphinx --upgrade
|
||||
pip list
|
||||
|
||||
- name: Configure link checks
|
||||
|
@ -52,7 +84,7 @@ jobs:
|
|||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DLINKCHECK=ON -DDE=ON -DES=ON -DFI=ON -DFR=ON -DHU=ON -DJA=ON -DIT=ON ..
|
||||
cmake -DLINKCHECK=ON -DDE=ON -DES=ON -DFI=ON -DFR=ON -DHU=ON -DJA=ON -DIT=ON -DPT=ON -DSV=ON -DTR=ON -DNL=ON -DZH=ON ..
|
||||
|
||||
- name: Check Links languages
|
||||
if: env.PROCESS == 'true'
|
||||
|
|
|
@ -157,7 +157,7 @@ message(STATUS "OSGeoLiveDoc_DOC_TARGETS = ${OSGeoLiveDoc_DOC_TARGETS}")
|
|||
# TODO: figure out how to support this
|
||||
# "el" "hu" "id" "zh")
|
||||
#---------------------------------------------
|
||||
set(OSGeoLiveDoc_SUPPORTED_LANGUAGES "de" "es" "fi" "fr" "hu" "it" "ja")
|
||||
set(OSGeoLiveDoc_SUPPORTED_LANGUAGES "de" "es" "fi" "fr" "hu" "it" "ja" "nl" "pt" "sv" "tr" "zh")
|
||||
set(OSGeoLiveDoc_ENGLISH "en")
|
||||
|
||||
#---------------------------------------------
|
||||
|
@ -219,6 +219,9 @@ INSERT_INTO_MAP("ko" "한국어")
|
|||
INSERT_INTO_MAP("pl" "Polski")
|
||||
INSERT_INTO_MAP("pt" "Portugus")
|
||||
INSERT_INTO_MAP("ru" "Русский")
|
||||
INSERT_INTO_MAP("sv" "Swidish")
|
||||
INSERT_INTO_MAP("nl" "Dutch")
|
||||
INSERT_INTO_MAP("tr" "Turkish")
|
||||
INSERT_INTO_MAP("zh" "中文")
|
||||
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ today_fmt = '%B %d, %Y'
|
|||
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
language = 'en'
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
|
@ -203,6 +203,7 @@ linkcheck_ignore = [
|
|||
|
||||
# 403 Client Error
|
||||
r'https://docs.etf-validator.net',
|
||||
r'https://etf-validator.net',
|
||||
r'https://www.ogc.org',
|
||||
|
||||
# link exists but when many link checks are done link checker fails
|
||||
|
|
Loading…
Reference in New Issue