Skip to content

Commit a6e8404

Browse files
authored
Merge pull request #473 from NLeSC/470-use-lychee-in-generated-package
Use lychee to test links in generated package
2 parents 81fb2e2 + 017e296 commit a6e8404

File tree

4 files changed

+44
-51
lines changed

4 files changed

+44
-51
lines changed

copier.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ license:
7171
- "Not open source"
7272
default: "MIT license"
7373

74+
AddLinkCheck:
75+
when: "{{ template_profile == 'ask' }}"
76+
type: bool
77+
default: "{{ template_profile != 'minimum' }}"
78+
help: Do you want to add a GitHub action to check broken links?
79+
7480
AddGitHubActions:
7581
when: "{{ template_profile == 'ask' }}"
7682
type: bool

template/.github/workflows/markdown-link-check.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: link-check
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
schedule:
12+
- cron: '0 0 1 * *' # first day of every month at midnight
13+
14+
permissions:
15+
contents: read
16+
issues: write
17+
18+
jobs:
19+
linkChecker:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Link Checker
25+
id: lychee
26+
uses: lycheeverse/lychee-action@v1
27+
28+
- name: Set Issue Title
29+
id: set_title
30+
run: echo "ISSUE_TITLE=Link Checker Report - $(date '+%Y-%m-%d')" >> $GITHUB_ENV
31+
32+
- name: Create Issue From File
33+
if: env.lychee_exit_code != 0
34+
uses: peter-evans/create-issue-from-file@v5
35+
with:
36+
title: ${{ env.ISSUE_TITLE }}
37+
content-filepath: ./lychee/out.md
38+
labels: report, automated issue

template/.mlc-config.json

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

0 commit comments

Comments
 (0)