Skip to content

linkcheck_website

linkcheck_website #308

Workflow file for this run

# This is workflow for checking links
name: linkcheck_website
on:
# run two times a weekday
schedule:
- cron: '31 18 * * 2,4'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check_links:
runs-on: ubuntu-latest
steps:
# linkcheck
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: filiph/linkcheck@f2c15a0be0d9c83def5df3edcc0f2d6582845f2d # 3.0.0
with:
arguments: https://fusionauth.io/ --skip-file config/linkcheck/linkcheck-skip.txt --connection-failures-as-warnings -d 2>&1 | tee linkcheckoutput.txt
name: linkcheck
# check for webflow links
- name: Check for FusionAuth webflow lines
run: |
count=$(grep -c "fusionauth.webflow.io" linkcheckoutput.txt || true)
echo "Found $count lines containing fusionauth.webflow.io"
if [ $count -gt 0 ]; then
echo "Error: Found fusionauth.webflow.io references in output.txt"
grep "fusionauth.webflow.io" linkcheckoutput.txt
exit 1
fi
send_mail_on_failure:
needs: check_links
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- uses: dawidd6/action-send-mail@4226df7daafa6fc901a43789c49bf7ab309066e7 # v3
with:
server_address: ${{secrets.MAIL_HOST}}
server_port: ${{secrets.MAIL_PORT}}
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: Failed linkcheck2
to: ${{secrets.WEBSITE_SLACK_CHANNEL_NOTIFICATION_EMAIL}}
from: FusionAuth GitHub Actions <noreply@fusionauth.io>
body: "Linkcheck failed, https://github.com/FusionAuth/fusionauth-site/actions/workflows/linkcheck.yml has more."