Skip to content

Commit 95a58b0

Browse files
authored
ENH: update linkchecker (#589)
1 parent d20a55b commit 95a58b0

File tree

1 file changed

+21
-34
lines changed

1 file changed

+21
-34
lines changed

.github/workflows/linkcheck.yml

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,31 @@
11
name: Link Checker [Anaconda, Linux]
22
on:
3-
pull_request:
4-
types: [opened, reopened]
53
schedule:
6-
# UTC 12:00 is early morning in Australia
7-
- cron: '0 12 * * *'
4+
# UTC 23:00 is early morning in Australia (9am)
5+
- cron: '0 23 * * *'
6+
workflow_dispatch:
87
jobs:
9-
link-check-linux:
10-
name: Link Checking (${{ matrix.python-version }}, ${{ matrix.os }})
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os: ["ubuntu-latest"]
16-
python-version: ["3.12"]
8+
link-checking:
9+
name: Link Checking
10+
runs-on: "ubuntu-latest"
11+
permissions:
12+
issues: write # required for peter-evans/create-issue-from-file
1713
steps:
14+
# Checkout the live site (html)
1815
- name: Checkout
1916
uses: actions/checkout@v4
20-
- name: Setup Anaconda
21-
uses: conda-incubator/setup-miniconda@v3
2217
with:
23-
auto-update-conda: true
24-
auto-activate-base: true
25-
miniconda-version: 'latest'
26-
python-version: "3.12"
27-
environment-file: environment.yml
28-
activate-environment: quantecon
29-
- name: Download "build" folder (cache)
30-
uses: dawidd6/action-download-artifact@v9
31-
with:
32-
workflow: cache.yml
33-
branch: main
34-
name: build-cache
35-
path: _build
18+
ref: gh-pages
3619
- name: Link Checker
37-
shell: bash -l {0}
38-
run: jb build lectures --path-output=./ --builder=custom --custom-builder=linkcheck
39-
- name: Upload Link Checker Reports
40-
uses: actions/upload-artifact@v4
41-
if: failure()
20+
id: lychee
21+
uses: lycheeverse/lychee-action@v2
22+
with:
23+
fail: false
24+
args: --accept 403,503 *.html
25+
- name: Create Issue From File
26+
if: steps.lychee.outputs.exit_code != 0
27+
uses: peter-evans/create-issue-from-file@v5
4228
with:
43-
name: linkcheck-reports
44-
path: _build/linkcheck
29+
title: Link Checker Report
30+
content-filepath: ./lychee/out.md
31+
labels: report, automated issue, linkchecker

0 commit comments

Comments
 (0)