Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions templates/_templating_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
"benchmarks/custom_bms/README.md": {
"iris": "benchmarks/custom_bms/README.md",
"iris-esmf-regrid": "benchmarks/custom_bms/README.md"
},
"github/workflows/ci-linkchecks.yml": {
"iris": ".github/workflows/ci-linkchecks.yml"
}
}
35 changes: 35 additions & 0 deletions templates/github/workflows/ci-linkchecks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Linkcheck

on:
workflow_dispatch:
schedule:
- cron: "00 06 * * *" # TEMPLATE EXAMPLE: schedule = every day at 6am

jobs:
linkChecker:
runs-on: ubuntu-latest
permissions:
issues: write # required for peter-evans/create-issue-from-file
steps:
- uses: actions/checkout@v4

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6
with:
fail: false
# TEMPLATE EXAMPLE: check files = RST and INC in docs, PY in source
args: "--verbose './docs/**/*.rst' './docs/**/*.inc' './lib/**/*.py'"

- name: Create Issue From File
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: "Bot, Type: Documentation, Type: Bug" # TEMPLATE EXAMPLE = failure Issue labels

- name: Fail Workflow On Link Errors
if: steps.lychee.outputs.exit_code != 0
run:
exit {{ steps.lychee.outputs.exit_code }}
Loading