Skip to content

Check links

Check links #15

Workflow file for this run

name: "Check links"
on:
status
jobs:
linkchecker:
runs-on: ubuntu-latest
# We only want to run this after the Netlify deploy preview has successfully been deployed.
if: >-
github.event.context == 'netlify/compiler-actions-testing/deploy-preview' &&
github.event.state == 'success'
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
persist-credentials: false # since the next step does not need it
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 #7.0.0
with:
python-version: "3.12"
- run: pip install linkchecker
- run: linkchecker --check-extern -v ${{ github.event.target_url }}
id: linkchecker_results
- uses: LouisBrunner/checks-action@v2.0.0
if: ${{ always() }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ github.event.commit.sha }}
name: "Check links"
conclusion: ${{ job.status }}
debug-event-context:
runs-on: ubuntu-latest
steps:
- env:
EVENT_CONTEXT: ${{ toJSON(github.event) }}
run: |
echo $EVENT_CONTEXT