38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
on:
|
|
pull_request:
|
|
paths:
|
|
- 'website/**'
|
|
|
|
name: Check markdown links on modified website files
|
|
jobs:
|
|
vercel-deployment-poll:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 3 #cancel job if no deployment is found within x minutes
|
|
outputs:
|
|
url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
|
|
steps:
|
|
- name: Wait for Vercel preview deployment to be ready
|
|
uses: nywilken/wait-for-vercel-preview@master
|
|
id: waitForVercelPreviewDeployment
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
max_timeout: 600 # in seconds, set really high to leverage job timeout-minutes values
|
|
allow_inactive: true # needed to ensure we get a URL for a previously released deployment
|
|
markdown-link-check:
|
|
needs: vercel-deployment-poll
|
|
if: ${{ needs.vercel-deployment-poll.outputs.url != '' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get Deployment URL
|
|
run:
|
|
echo "DEPLOYMENT_URL=${{ needs.vercel-deployment-poll.outputs.url }}" >> $GITHUB_ENV
|
|
- name: Checkout source branch
|
|
uses: actions/checkout@master
|
|
- name: Check links
|
|
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
with:
|
|
use-quiet-mode: 'yes'
|
|
file-extension: 'mdx'
|
|
check-modified-files-only: 'yes'
|
|
folder-path: 'website/content'
|