Skip to content

ENH: use lychee for linkchecking #349

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

Merged
merged 10 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
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
54 changes: 20 additions & 34 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,30 @@
name: Link Checker [Anaconda, Linux]
on:
pull_request:
types: [opened, reopened]
schedule:
# UTC 12:00 is early morning in Australia
- cron: '0 12 * * *'
# UTC 23:00 is early morning in Australia (9am)
- cron: '0 23 * * *'
jobs:
execution-tests-linux:
name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.12"]
link-checking:
name: Link Checking
runs-on: "ubuntu-latest"
permissions:
issues: write # required for peter-evans/create-issue-from-file
steps:
# Checkout the live site (html)
- name: Checkout
uses: actions/checkout@v4
- name: Setup Anaconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
miniconda-version: 'latest'
python-version: "3.12"
environment-file: environment.yml
activate-environment: quantecon
- name: Download "build" folder (cache)
uses: dawidd6/action-download-artifact@v10
with:
workflow: cache.yml
branch: main
name: build-cache
path: _build
ref: gh-pages
- name: Link Checker
shell: bash -l {0}
run: jb build lectures --path-output=./ --builder=custom --custom-builder=linkcheck
- name: Upload Link Checker Reports
uses: actions/upload-artifact@v4
if: failure()
id: lychee
uses: lycheeverse/lychee-action@v2
with:
fail: false
args: --accept 403 .
- name: Create Issue From File
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
name: linkcheck-reports
path: _build/linkcheck
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue, linkchecker
2 changes: 1 addition & 1 deletion lectures/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ execute:
timeout: 600 # 10 minutes

html:
baseurl: https://python.quantecon.org/
baseurl: https://python-programming.quantecon.org/

latex:
latex_documents:
Expand Down
Loading