Skip to content

Commit 24111ba

Browse files
authored
Add lychee link checker (#80)
* Add lychee link checker * Add exclusion for local links and email (test data) * Exclude localhost * Exclude loopback * Add localhost regex :/ * Fix regex :'( * Fix argument formatting :'( * Fix formatting :'''( * Exclude lesson specific urls * Update job name to clarify purpose * Remove link local exclusion
1 parent 4752fe1 commit 24111ba

File tree

2 files changed

+34
-23
lines changed

2 files changed

+34
-23
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CodeTour and Links Watcher
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
12+
jobs:
13+
codetour-links-watcher:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: 'Checkout source code'
17+
uses: actions/checkout@v2
18+
19+
- name: 'Watch CodeTour changes'
20+
uses: pozil/[email protected]
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
tour-path: '.tours/'
24+
25+
- name: Link Checker
26+
id: lychee
27+
uses: lycheeverse/[email protected]
28+
with:
29+
args: --verbose --no-progress --exclude-mail --exclude-loopback --exclude "https?://localhost.*" "https://sandbox.api.sap.com.*" "https://azure-university-app-config.*" "https://192.168.7.108.*" -- "**/*.md"
30+
env:
31+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32+
33+
- name: Fail if there were link errors
34+
run: exit ${{ steps.lychee.outputs.exit_code }}

.github/workflows/code-tour-watch.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)