Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update broken-linkcheck.yml #56306

Closed
wants to merge 4 commits into from
Closed
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
29 changes: 28 additions & 1 deletion .github/workflows/broken-linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,40 @@ jobs:
- name: Build Pandas
uses: ./.github/actions/build_pandas

- name: Set current date as environment variable
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- 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: failure() && 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()
if: failure() && github.event_name == 'schedule'
working-directory: ./doc
run: grep broken linkcheck.txt
Loading