diff --git a/.github/workflows/sphinx-check-links.yml b/.github/workflows/sphinx-check-links.yml new file mode 100644 index 00000000000..1b8a8782aa5 --- /dev/null +++ b/.github/workflows/sphinx-check-links.yml @@ -0,0 +1,37 @@ +name: "Check Page for Broken Links" +on: + workflow_dispatch: + push: + branches: + - master + schedule: + # Run every morning to ensure component documentation is up to date on deployment + - cron: '23 5 * * *' + pull_request: # only runs up through build of sphinx + +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: '3.8' + cache: 'pip' + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade --requirement requirements.txt + - name: Install generate_parameter_library + run: | + cd + git clone https://github.com/PickNikRobotics/generate_parameter_library.git + cd generate_parameter_library/generate_parameter_library_py/ + python -m pip install . + - name: Run linkchecker + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + make linkcheck diff --git a/README.md b/README.md index 8cac04a5134..501b611449e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Status -[![Build & Deploy Page](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-make-page.yml/badge.svg)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-make-page.yml)[![Sphinx Warnings](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-warnings.yml/badge.svg?branch=master)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-warnings.yml) +[![Build & Deploy Page](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-make-page.yml/badge.svg)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-make-page.yml)[![Sphinx Warnings](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-warnings.yml/badge.svg?branch=master)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-warnings.yml)[![Broken Links](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-links.yml/badge.svg?branch=master)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-links.yml) # control.ros.org