diff --git a/.github/workflows/deadlink.yml b/.github/workflows/deadlink.yml new file mode 100644 index 00000000..61a71804 --- /dev/null +++ b/.github/workflows/deadlink.yml @@ -0,0 +1,22 @@ +name: dead link check + +on: + pull_request: + schedule: + - cron: '0 18 * * *' # TimeZone: UTC 0 + +jobs: + dead-link: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - run: sudo npm install -g markdown-link-check@3.11.2 + - run: sudo apt install plocate -y + # NOTE: Change command from `find . -name "*.md"` to `find . -not -path "*/node_modules/*" -not -path "*/.tox/*" -name "*.md"` + # if you want to run check locally + - run: | + for file in $(locate "$PWD*/*.md" | grep -v ./deploy/terraform/aws/README.md); do + markdown-link-check -c .dlc.json -q "$file" & + done + wait \ No newline at end of file