QuantEcon / QuantEcon/lecture-dp
Linkcheck: transition to QuantEcon/action-link-checker
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 0
- Forks
- 0
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
PR #26 added a bespoke linkcheck.yml that wires together three moving parts by hand — wget-mirroring the live site, lycheeverse/lychee-action, and peter-evans/create-issue-from-file. This issue tracks replacing that with QuantEcon's purpose-built composite action, QuantEcon/action-link-checker, so lecture-dp matches the rest of the lecture family (lecture-python-programming already runs it).
Why switch
Current (linkcheck.yml from #26) |
With action-link-checker |
|---|---|
| Three stitched-together steps to maintain | One maintained org action |
lychee over **/*.html flags local _static/*, JS and image refs as broken (the mirror only pulls .html) |
Scans external web links only — no local-asset false positives |
create-issue-from-file + hand-set labels |
Native create-issue + notify (auto-assigns maintainers) |
| Weekly schedule only | Also supports mode: changed for PR-level checks later |
Open decision — where the HTML comes from
The action takes an html-path directory (default ./_build/html). lecture-dp has no gh-pages branch (it deploys via the OIDC artifact workflow), which is exactly why #26 reached for wget-mirroring — so the transition still has to answer this. The cleanest option is to build in-workflow behind the existing Jupyter cache (a warm-cache build skips execution and runs fast) and point the action at the build output; the lower-cost alternative is to keep wget-mirroring the live site into a directory and pass that as html-path.
Sketch (build-in-workflow variant)
Pin to a release tag — only v1.0.0 exists today, there is no sliding v1 (lecture-python-programming pins @main). With Dependabot now configured, a tag pin will be kept current automatically.
name: Link Checker
on:
schedule:
- cron: '0 23 * * 0' # Sunday 23:00 UTC
workflow_dispatch:
jobs:
link-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/quantecon/quantecon-build:latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: quantecon/actions/restore-jupyter-cache@v0.6.0
- uses: quantecon/actions/build-lectures@v0.6.0
id: build
with:
builder: html
- uses: QuantEcon/action-link-checker@v1.0.0
with:
html-path: ${{ steps.build.outputs.build-path }}
mode: full
fail-on-broken: 'false'
create-issue: 'true'
silent-codes: '403,503'
issue-title: 'Weekly Link Check Report'
notify: 'mmcky'
Acceptance criteria
- Decide the HTML source (in-workflow build vs.
wget-mirror) - Replace
linkcheck.ymlwithaction-link-checker, pinned to a release tag - Smoke-test via
workflow_dispatch: confirm a clean run, and that a seeded broken link produces an assigned issue - Remove the now-unused
lychee/create-issue-from-filewiring
Part of #22; supersedes the interim linkcheck.yml introduced in #26.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing linkcheck.yml and compare it with lecture-python-programming's use of QuantEcon/action-link-checker. Resolve whether HTML should come from the in-workflow build or a wget mirror, then use the acceptance criteria to replace the hand-wired steps and remove unused actions. Validate with workflow_dispatch, including a seeded broken link that creates an assigned issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, yaml
- Domain
- ci-cd
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100