feat(workflow): add workflow for checking broken links #42
Workflow file for this run
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
# Copyright the Hyperledger Fabric contributors. All rights reserved. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: "Broken link checker" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "50 1 * * *" | |
pull_request: | |
permissions: | |
contents: read | |
env: | |
GO_VER: 1.20.5 | |
jobs: | |
broken-lint-checker: | |
name: "Check for Broken Links" | |
runs-on: fabric-ubuntu-latest | |
steps: | |
- name: Checkout Fabric Code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VER }} | |
- name: Install Muffet | |
run: go install github.com/raviqqe/muffet/v2@latest | |
- name: Check Broken Links with Muffet | |
# Exclude zip file to prevent downloading the amount of data that cannot be supported by muffet | |
# Exclude any links from stackoverflow as it results in 403 HTTP status code (Forbidden) | |
run: muffet --verbose --buffer-size=2147483647 --color=always --one-page-only --exclude="(^.*zip\/$)|(^(https:\/\/stackoverflow.com).*$)" https://hyperledger-fabric.readthedocs.io | |