Skip to content

Commit 993563d

Browse files
author
markzegarelli
committed
link check
1 parent dbc7632 commit 993563d

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

.github/workflows/check-links.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,29 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
fail-fast: false
20-
# steps:
21-
# - uses: actions/checkout@v2
22-
# - name: Ruby
23-
# uses: ruby/setup-ruby@v1
24-
# with:
25-
# ruby-version: 2.6 # Not needed with a .ruby-version file
26-
# bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27-
# - name: Yarn install
28-
# run: yarn install
29-
# - name: Build jekyll website with
30-
# run: bundle exec jekyll build
31-
# - name: Check for broken links
32-
# run: |
33-
# yarn run hyperlink ./_site/index.html --canonicalroot https://segment.com/docs -i -r --skip 0.0.0.0 | yarn run tap-spot > output.md
34-
# continue-on-error: true
35-
# - name: Archive log links
36-
# uses: actions/upload-artifact@v1
37-
# with:
38-
# name: links-check.log
39-
# path: output.md
40-
# - name: Create Issue From File
41-
# uses: peter-evans/create-issue-from-file@v2
42-
# with:
43-
# title: Link Checker Report
44-
# content-filepath: output.md
45-
# labels: report, automated issue
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Ruby
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: 2.6 # Not needed with a .ruby-version file
26+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27+
- name: Yarn install
28+
run: yarn install
29+
- name: Build jekyll website with
30+
run: bundle exec jekyll build
31+
- name: Link Checker
32+
uses: lycheeverse/[email protected]
33+
with:
34+
args: --verbose --no-progress **/*.html -a 429 -c ./lychee.toml -o lychee-out.txt
35+
env:
36+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
37+
- name: "exclude non-400 errors"
38+
run: |
39+
cat ./lychee/out.md | grep -v "error sending request" > ./lychee/out.md
40+
- name: Create Issue From File
41+
uses: peter-evans/create-issue-from-file@v3
42+
with:
43+
title: Link Checker Report
44+
content-filepath: ./lychee/out.md
45+
labels: report, automated issue

lychee.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ max_redirects = 10
2626
user_agent = "lychee/0.8.0"
2727

2828
# Website timeout from connect to response finished
29-
timeout = 20
29+
timeout = 30
3030

3131
# Comma-separated list of accepted status codes for valid links.
3232
# Omit to accept all response types.
@@ -50,7 +50,7 @@ headers = []
5050
### Exclusions
5151
###
5252
# Exclude URLs from checking (supports regex)
53-
exclude = ['https://ajs.cd.segment.com/analytics.js/v1/','http://0.0.0.0:4000','https://api.segment.io/v1/', 'https://segment.com/docs/assets/docs.bundle.js']
53+
exclude = ['https://ajs.cd.segment.com/analytics.js/v1/','http://0.0.0.0:4000','https://api.segment.io/v1/', 'https://segment.com/docs/assets/docs.bundle.js','https://www.linkedin.com', 'https://segment.com/jobs/', 'https://segment.com/press/', 'https://github.com/segmentio', 'https://unpkg.com/@segment/[email protected]/standalone/consent-manager.js', '(segment.com)', '(segmentapis.com)', '(example.com)', '(schema.org)']
5454

5555
# Exclude URLs contained in a file from checking
5656
exclude_file = []

0 commit comments

Comments
 (0)