Skip to content

Commit

Permalink
Use Github action for link validator
Browse files Browse the repository at this point in the history
I figured out how to use urlsup with a decent API so we can migrate away
from Travis CI and instead use Github actions.
  • Loading branch information
simeg committed Jan 2, 2021
1 parent 07ebfc7 commit d3f0cb1
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Links

on: [push, pull_request]

env:
FORCE_COLOR: 1

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Find markdown files
shell: bash
run: |
echo 'FILES_TO_CHECK<<EOF' >> $GITHUB_ENV
# $GITHUB_WORKSPACE is where our files live
# Ignore dirs and only include markdown files
files_to_check=$(find $GITHUB_WORKSPACE -type f \
-not -path '*/\.git/*' -not -path '*/\.github/*' \
-name "*.md")
echo $files_to_check >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Validate that links are up
uses: simeg/[email protected]
with:
args: ${{ env.FILES_TO_CHECK }} --threads 10 --allow 429 --white-list http://localhost

0 comments on commit d3f0cb1

Please sign in to comment.