Check links offline for dead targets #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "Check links offline for dead targets" | |
on: | |
# schedule every day at 3 AM on devel | |
schedule: | |
- cron: "0 3 * * *" | |
# Allow for manual trigger on the selected branch in UI | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
offline_link_check: | |
name: 'Validate mkdoc content' | |
if: github.repository == 'aristanetworks/avd' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Start docker-compose stack' | |
run: | | |
docker-compose -f development/docker-compose.yml up -d webdoc_avd | |
docker-compose -f development/docker-compose.yml ps | |
- name: 'Test connectivity to mkdoc server' | |
run: | | |
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:8000)" != "200" ]]; do sleep 5; done' | |
- name: Check links for 404 | |
run: | | |
docker run --network container:webdoc_avd raviqqe/muffet:2.10.1 http://127.0.0.1:8000/ -f \ | |
--buffer-size 8192 \ | |
--exclude ".*fonts.googleapis.com.*" \ | |
--exclude ".*fonts.gstatic.com.*" \ | |
--exclude ".*tools.ietf.org.*" \ | |
--exclude ".*edit.*" \ | |
--exclude ".*docs.github.com.*" \ | |
--exclude "twitter.com" \ | |
--exclude "www.docker.com" \ | |
--exclude "hub.docker.com" \ | |
--exclude "tech-library.arista.com" \ | |
--max-connections-per-host 30 \ | |
--max-redirections 3 \ | |
--rate-limit 1 \ | |
--timeout 30 | |
- name: 'Stop docker-compose stack' | |
run: | | |
docker-compose -f development/docker-compose.yml down |