Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
add GH Action to check links
Browse files Browse the repository at this point in the history
simplify checking of links

fix some links

fail properly

Don't check docs directory twice

attempt fixing erroring out

update bits

update theme

don't check GH home

update theme
  • Loading branch information
Daniel Holbach committed Jun 3, 2020
1 parent 0e34594 commit df9a3a4
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 4 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/check-links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: docs

on:
pull_request:
push:
branches:
- master

jobs:
markdown-link-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install markdown-link-check
run: |
npm i markdown-link-check
- name: Check non-user-guide markdown docs
run: |
find . \
-name vendor -prune -o \
-name node_modules -prune -o \
-name docs -prune -o \
-iname '*.md' \
-exec ./node_modules/markdown-link-check/markdown-link-check -q --config .github/workflows/markdown-link-check-config.json {} +
site-link-checker:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build docs for link check
run: mkdocs build

# Using liche action to check generated HTML site
- name: Link Checker (generated site)
id: lc2
uses: peter-evans/link-checker@v1
with:
args: -d site/ -r site/ -x 'github.com/weaveworks/ignite($|/issue|/pull)' -c 10

- name: Fail if there were link errors
run: exit ${{ steps.lc2.outputs.exit_code }}
6 changes: 6 additions & 0 deletions .github/workflows/markdown-link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ignorePatterns": [
{ "pattern": "^https://github.com/\\S+/\\S+/(issues|pull)/" },
{ "pattern": "^mailto:" }
]
}
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mkdocs == 1.1
mkdocs-material == 5.0.1
pymdown-extensions >= 7.0.0
mkdocs == 1.1.2
mkdocs-material == 5.2.2
pymdown-extensions >= 7.1
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ markdown_extensions:
- admonition
- codehilite:
guess_lang: false
- pymdownx.superfences
- pymdownx.tabbed
- toc:
permalink: true

0 comments on commit df9a3a4

Please sign in to comment.