-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (35 loc) · 1.07 KB
/
linkcheck.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Link Check
on:
repository_dispatch:
pull_request:
schedule:
- cron: "0 0 * * *"
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
jobs:
linkCheck:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v4
- name: Setup
run: |
make subup
- name: Link Check
id: lychee
uses: lycheeverse/lychee-action@v1
with:
args: --base . ./public/docs/* --exclude https://github.com/vdaas/vald/*
output: ./check.md
fail: false
- name: Create Issue From File
if: env.lychee_exit_code != 0 && github.event_name != 'pull_request'
run: |
ISSUE_TITLE="Dead Links were detected"
gh issue create --title ISSUE_TITLE \
--body-file ./check.md
- name: Add Comment On Pull Request From File
if: env.lychee_exit_code != 0 && github.event_name == 'pull_request'
run: |
gh pr comment ${{ github.event.number }} --body-file ./check.md