Skip to content

Commit

Permalink
Feat: add github workfolw to check markdown file error link (#3492)
Browse files Browse the repository at this point in the history
* feat: add github workfolw to check markdown file error link

* docs: fix markdown error link
  • Loading branch information
yuluo-yx authored Nov 12, 2023
1 parent 2823ae7 commit 6843cb0
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 5 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/md-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Link Checker'

# **What it does**: Renders the content of every page and check all internal links.
# **Why we have it**: To make sure all links connect correctly.
# **Who does it impact**: Docs content.

on:
workflow_dispatch:
push:
# branches: [master, 'release/**']
paths:
- '**/*.md'
- '**/link-check.yml'
pull_request:
branches: [master, "release/**"]
paths:
- '**/*.md'
- '**/link-check.yml'

permissions:
contents: read
# Needed for the 'trilom/file-changes-action' action
pull-requests: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get script
run: |
wget https://raw.githubusercontent.com/xuruidong/markdown-link-checker/main/link_checker.py
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Link check (critical, all files)
run: |
# python link_checker.py ./ --enable-external --ignore "http://apisix.iresty.com" "https://www.upyun.com" "https://github.com/apache/apisix/actions/workflows/build.yml/badge.svg" "https://httpbin.org/" "https://en.wikipedia.org/wiki/Cache"
python link_checker.py ./
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ If you are interested or want to go deeper, you are welcome to study the individ
- [Nacos discovery example](../../../nacos-example/nacos-discovery-example/readme.md)
- [Sentinel core example](../../../sentinel-example/sentinel-core-example/readme.md)
- [Seata example](../../../seata-example/readme.md)
- [RocketMQ example](../../rocketmq-example/readme.md)
- [RocketMQ example](../../../rocketmq-example/readme.md)
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ Of course, there is more to each component than just what is demonstrated in the
- [Nacos discovery example](../../../nacos-example/nacos-discovery-example/readme.md)
- [Sentinel core example](../../../sentinel-example/sentinel-core-example/readme.md)
- [Seata example](../../../seata-example/readme.md)
- [RocketMQ example](../../rocketmq-example/readme.md)
- [RocketMQ example](../../../rocketmq-example/readme.md)
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,4 @@ If you are interested or want to go deeper, you are welcome to study the individ
- [Nacos discovery example](../../../nacos-example/nacos-discovery-example/readme.md)
- [Sentinel core example](../../../sentinel-example/sentinel-core-example/readme.md)
- [Seata example](../../../seata-example/readme.md)
- [RocketMQ example](../../rocketmq-example/readme.md)
- [RocketMQ example](../../../rocketmq-example/readme.md)
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ Spring Cloud GateWay 整合 Nacos,实现动态路由配置。

## 版本说明

本项目提供了[本地部署运行版本](local-deployment-zh.md)[docker-compose 版本](docker-compose-deployment-zh.md)以及 [Kubernetes Helm-Chart 版本](kubernetes-deployment-zh.md)
本项目提供了[本地部署运行版本](local-deployment-zh.md)[docker-compose 版本](docker-compose-deploy-zh.md)以及 [Kubernetes Helm-Chart 版本](kubernetes-deployment-zh.md)

- 如果想要了解具体如何配置各项组件以及完整环境搭建,推荐学习[本地部署运行版本](local-deployment-zh.md)

- 如果只想运行示例代码,避免繁琐的本地环境搭建过程,又不想使用 k8s 集群。您可以尝试使用 [docker-compose 版本](docker-compose-deployment-zh.md)
- 如果只想运行示例代码,避免繁琐的本地环境搭建过程,又不想使用 k8s 集群。您可以尝试使用 [docker-compose 版本](docker-compose-deploy-zh.md)

- 如果想要在 K8S 集群上快速体验组件效果,跳过各个组件环境部署等过程,请查看 [Kubernetes Helm-Chart 版本](kubernetes-deployment-zh.md)

0 comments on commit 6843cb0

Please sign in to comment.