Skip to content

Commit

Permalink
Merge branch 'docs/add_link_check_function' into 'master'
Browse files Browse the repository at this point in the history
docs: Add gitlab CI for linkcheck

Closes DOC-10014

See merge request ae_group/esp-dev-kits!209
  • Loading branch information
Zhang Shu Xian committed Feb 19, 2025
2 parents bad04b2 + 53071b5 commit 94c32ad
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitlab/ci/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
ESP_IDF_DOC_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.2:1-1"
ESP_IDF_DOC_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.4:1-1"

.build_docs_template:
image: $ESP_IDF_DOC_ENV_IMAGE
Expand Down
20 changes: 20 additions & 0 deletions .gitlab/ci/pre_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,23 @@ check_readme_links:
allow_failure: true
script:
- python ${CI_PROJECT_DIR}/tools/ci/check_readme_links.py

check_doc_links:
stage: pre_check
image: $ESP_DOCS_ENV_IMAGE
tags: [check_doc_links]
variables:
DOCS_DIR: $CI_PROJECT_DIR/docs
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Run for all changes to a merge request's source branch
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run for all changes to the default branch
script:
- cd docs
- cd $DOCS_DIR
- pip install -r requirements.txt
- build-docs -t $DOCTGT -l $DOCLANG linkcheck
parallel:
matrix:
- DOCLANG: ["en", "zh_CN"]
DOCTGT: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c2', 'esp32p4', 'esp32c5', 'esp32c61', 'other']
6 changes: 6 additions & 0 deletions docs/conf_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,9 @@
# Measurement ID for Google Analytics

google_analytics_id = 'G-6GCDQQ87G0'

# disable the check for link anchors
linkcheck_anchors = False

linkcheck_exclude_documents = ['index', # several false positives due to the way we link to different sections
]
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
esp-docs>=1.11.0
esp-docs==1.12.0

0 comments on commit 94c32ad

Please sign in to comment.