2021-01-25 10:28:34 -05:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'website/**'
|
|
|
|
|
|
|
|
name: Check markdown links on modified website files
|
2021-01-05 10:18:51 -05:00
|
|
|
jobs:
|
2021-01-25 10:28:34 -05:00
|
|
|
vercel-deployment-poll:
|
|
|
|
runs-on: ubuntu-latest
|
2021-03-18 15:31:04 -04:00
|
|
|
timeout-minutes: 5 #cancel job if no deployment is found within x minutes
|
2021-01-25 10:28:34 -05:00
|
|
|
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
|
2021-01-05 10:18:51 -05:00
|
|
|
markdown-link-check:
|
2021-01-25 10:28:34 -05:00
|
|
|
needs: vercel-deployment-poll
|
|
|
|
if: ${{ needs.vercel-deployment-poll.outputs.url != '' }}
|
2021-01-05 10:18:51 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-01-25 10:28:34 -05:00
|
|
|
- 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
|
2021-01-05 10:18:51 -05:00
|
|
|
with:
|
|
|
|
use-quiet-mode: 'yes'
|
|
|
|
file-extension: 'mdx'
|
|
|
|
check-modified-files-only: 'yes'
|
|
|
|
folder-path: 'website/content'
|