Skip to content

Commit

Permalink
Add a link checker to CI. (#122)
Browse files Browse the repository at this point in the history
Solves #120.
  • Loading branch information
samcunliffe authored Jul 26, 2023
1 parent caf059e commit f9399d0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is a basic workflow to check for broken links with GitHub Actions

name: Link Checker

on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
linkChecker:
timeout-minutes: 2
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Link Checker
id: lychee
uses: lycheeverse/[email protected]
with:
# Exclude the image.sc forum (which works) but returns 403 from
# github runners, ignore the project slug README since the links are
# necessarily not real links - i.e. demos and to be filled by
# cookiecutter values.
args: "--verbose --exclude https://forum.image.sc/ --exclude-path '{{cookiecutter.project_slug}}/README.md' -- ."
fail: true
jobSummary: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
12 changes: 6 additions & 6 deletions docs/pages/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ layout: default

## Doc building

| Name | Short description | 🚦 | Used by |
| ----------------------------------------------- | --------------------------------------------------------------- | :-: | ------------------------------------------- |
| [sphinx](https://www.sphinx-doc.org/en/master/) | Generates documentation from reStructuredText or Markdown files | 🟢 | [TLOModel](https://github.com/UCL/TLOmodel) |
| [mkdocs](https://www.mkdocs.org/) | Generates documentation from Markdown files | 🟠 | |
| [pdoc](https://pdoc.dev/) | Auto-generates API documentation from docstrings | 🟠 | [MICI](https://github.com/matt-graham/mici) |
| [gitbook](https://www.gitbook.com/) | General documentation builder; integrates with GitHub | 🟠 | |
| Name | Short description | 🚦 | Used by |
| ----------------------------------------------- | --------------------------------------------------------------- | :-: | ---------------------------------------------------------------------- |
| [sphinx](https://www.sphinx-doc.org/en/master/) | Generates documentation from reStructuredText or Markdown files | 🟢 | [WAZP](https://github.com/SainsburyWellcomeCentre/WAZP/tree/main/docs) |
| [mkdocs](https://www.mkdocs.org/) | Generates documentation from Markdown files | 🟠 | |
| [pdoc](https://pdoc.dev/) | Auto-generates API documentation from docstrings | 🟠 | [MICI](https://github.com/matt-graham/mici) |
| [gitbook](https://www.gitbook.com/) | General documentation builder; integrates with GitHub | 🟠 | |

<details>
<summary> 🟢 explaination</summary>
Expand Down

0 comments on commit f9399d0

Please sign in to comment.