Skip to content

Broken Links Check #244

Broken Links Check

Broken Links Check #244

name: Broken Links Check
on:
push:
schedule:
- cron: "0 12 * * 2,4,6" # At 12:00 on Tuesday, Thursday, and Saturday.
jobs:
my-broken-link-checker:
name: Broken Links Check
runs-on: ubuntu-latest
steps:
- name: Check
uses: ruzickap/action-my-broken-link-checker@v2
with:
url: https://petrhurtak.com
# Params docs https://github.com/raviqqe/muffet/blob/main/.snapshots/TestHelp
# `timeout`
# Increased because some links are on free Netlify or Heroku which can put the instances to sleep and it
# can take a long time for them to start again.
# `buffer-size`
# Increased otherwise it fails with "error when reading response headers: small read buffer".
# `exclude="https://www.linkedin.com"`
# Because LinkedIn returns 999 status code for bots.
# `exclude="https://stackoverflow.com"`
# Because StackOverflow returns 403 status code for bots.
# TODO
# Add header parameter because some services will fail when it is missing
# --header="user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
# But there is this issue https://github.com/ruzickap/action-my-broken-link-checker/issues/83
# After it is resolved maybe we can remove the exclude?
cmd_params: >
--timeout=30
--buffer-size=10000
--exclude="https://www.linkedin.com"
--exclude="https://stackoverflow.com"
--exclude="https://insights.stackoverflow.com"
--color=always
--verbose