Check for Broken Links #461
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 for Broken Links | |
on: | |
deployment_status | |
jobs: | |
linkinator: | |
runs-on: ubuntu-latest | |
# Runs if the deployment environment starts with 'preview' and the deployment status is 'success', and if the url does not contain 'analytics' | |
if: ${{ startsWith(github.event.deployment_status.environment, 'preview') && github.event.deployment_status.state == 'success' && !contains(github.event.deployment_status.environment_url, 'analytics')}} | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Run dead-link-checker | |
run: npx @jthrilly/dead-link-checker ${{ github.event.deployment_status.environment_url }} -v --yes |