Unverified Commit 91536f2d authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci][docs] use lychee GitHub actions for checking broken links (#7058)

parent 86b2cc89
......@@ -10,20 +10,4 @@ conda env create \
# shellcheck disable=SC1091
source activate test-env
# build docs
make -C docs html || exit 1
if [[ $TASK == "check-links" ]]; then
# check docs for broken links
conda install -y -n test-env 'lychee>=0.20.1'
# to see all gained files add "--dump-inputs" flag
# to see all gained links add "--dump" flag
lychee \
"--config=./docs/.lychee.toml" \
"--" \
"**/*.rst" \
"**/*.md" \
"./R-package/**/*.Rd" \
"./docs/_build/html/*.html" \
|| exit 1
fi
......@@ -11,7 +11,6 @@ env:
COMPILER: gcc
OS_NAME: 'linux'
TASK: 'check-links'
GITHUB_TOKEN: ${{ github.token }}
jobs:
check-links:
......@@ -24,9 +23,21 @@ jobs:
fetch-depth: 5
persist-credentials: false
submodules: false
- name: Setup and run tests
- name: Build docs
run: |
export CONDA=${HOME}/miniforge
export PATH=${CONDA}/bin:${HOME}/.local/bin:${PATH}
$GITHUB_WORKSPACE/.ci/setup.sh || exit 1
$GITHUB_WORKSPACE/.ci/test-docs.sh || exit 1
$GITHUB_WORKSPACE/.ci/build-docs.sh || exit 1
- name: Check links
uses: lycheeverse/lychee-action@v2.6.1
with:
args: >-
--config=./docs/.lychee.toml
--
"**/*.rst"
"**/*.md"
"./R-package/**/*.Rd"
"./docs/_build/html/*.html"
fail: true
failIfEmpty: true
......@@ -58,7 +58,7 @@ jobs:
export CONDA=${HOME}/miniforge
export PATH=${CONDA}/bin:$HOME/.local/bin:${PATH}
$GITHUB_WORKSPACE/.ci/setup.sh || exit 1
$GITHUB_WORKSPACE/.ci/test-docs.sh || exit 1
$GITHUB_WORKSPACE/.ci/build-docs.sh || exit 1
r-check-docs:
name: r-package-check-docs
timeout-minutes: 60
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment