Skip to content

Update broken-linkcheck.yml #50

Update broken-linkcheck.yml

Update broken-linkcheck.yml #50

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 }}
title: "Linkcheck Report - $(date +'%Y-%m-%d')"
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: $(date +"%Y-%m-%d")
#### Broken Links:
```
$(cat linkcheck.txt)
```
- name: Display broken links
if: failure() && github.event_name == 'schedule'
working-directory: ./doc
run: grep broken linkcheck.txt