Skip to content

Commit

Permalink
Check links on deployments, as well as via cron
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocher committed Jan 17, 2024
1 parent d55a2f0 commit 72666b2
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check Links

on:
# Allow manually triggering this workflow.
workflow_dispatch:

# Run onn deployments
deployment_status:

# Also run it every day at 4.15am UTC
schedule:
- cron: '15 4 * * *'

env:
SITE_URL: "https://fusedata.dev/"

jobs:
linkcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set site URL from the deployment status information
if: ${{ github.event_name == 'deployment_status' }}
run: |
echo "SITE_URL=${{github.event.deployment_status.environment_url}}" >> "$GITHUB_ENV"
- name: Check links on the live site
uses: filiph/[email protected]
with:
arguments: --external --nice $SITE_URL

0 comments on commit 72666b2

Please sign in to comment.