-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
62 lines (51 loc) · 1.58 KB
/
broken-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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Linkcheck
on:
schedule:
# Run monthly on the 1st day of the month
- cron: '0 0 1 * *'
pull_request:
paths:
- ".github/workflows/broken-linkcheck.yml"
- "doc/make.py"
jobs:
linkcheck:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Conda
uses: ./.github/actions/setup-conda
- name: Build Pandas
uses: ./.github/actions/build_pandas
- name: Run linkcheck script
working-directory: ./doc
run: |
set -o pipefail
python make.py linkcheck | tee linkcheck.txt
- name: Create or Update Linkcheck Issue
if: github.event_name == 'schedule'
uses: dacbd/create-issue-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
current_date: $(date +"%Y-%m-%d")
title: "Linkcheck Report - ${{ env.current_date }}"
labels: "Docs,Good First Issue,Linkcheck-Report"
body: |
### Linkcheck Report
This issue is automatically created or updated to report broken links found during the linkcheck process.
#### Summary:
- Number of Broken Links: X
- Date: ${{ env.current_date }}
#### Broken Links:
```
$(cat linkcheck.txt)
```
- name: Display broken links
if: failure() && github.event_name == 'schedule'
working-directory: ./doc
run: grep broken linkcheck.txt