forked from sb2nov/mac-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Github action for link validator
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
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |