Skip to content

Commit

Permalink
Add link checker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim committed Feb 27, 2024
1 parent f10204f commit d7dcedd
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/link-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: "Link Checker (Fail Fast)"

on:
push:
branches: ["main"]
pull_request:

jobs:
preview:
name: "Preview Deploy"
runs-on: "ubuntu-latest"
outputs:
preview_url: "${{ steps.waitForVercelPreviewDeployment.outputs.url }}"
steps:
- name: "Wait for Vercel preview deployment to be ready"
uses: "patrickedqvist/[email protected]"
id: "waitForVercelPreviewDeployment"
with:
token: "${{ secrets.GITHUB_TOKEN }}"
check_interval: 30
max_timeout: 600

link_checker:
name: "Link Checker"
runs-on: "ubuntu-latest"
needs: "preview"
timeout-minutes: 15
steps:
- uses: "actions/checkout@v3"
- name: "Link Checker"
uses: "lycheeverse/[email protected]"
with:
fail: true
args: "--verbose --no-progress --exclude '^https://github.com/.*.mdx' ${{ needs.preview.outputs.preview_url }}"

0 comments on commit d7dcedd

Please sign in to comment.