-
-
Notifications
You must be signed in to change notification settings - Fork 31
41 lines (41 loc) · 1.48 KB
/
Copy pathlinkcheck.yml
File metadata and controls
41 lines (41 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Link Checker [Anaconda, Linux]
on:
schedule:
# UTC 23:00 is early morning in Australia (9am) -- runs weekly on Sunday
- cron: '0 23 * * 0'
workflow_dispatch:
jobs:
link-checking:
name: QuantEcon AI link checking
runs-on: "ubuntu-latest"
permissions:
contents: read # read latest release assets via gh api
issues: write # required for QuantEcon link-checker
steps:
# Download the latest release HTML archive (permanent, not subject to artifact expiry)
- name: Get latest release asset URL
id: release
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
ASSET_URL=$(gh api repos/${{ github.repository }}/releases/latest \
--jq '[.assets[] | select(.name | endswith(".tar.gz")) | .browser_download_url] | first // ""')
if [ -z "$ASSET_URL" ]; then
echo "::error::No .tar.gz asset found on the latest release"
exit 1
fi
echo "asset-url=$ASSET_URL" >> "$GITHUB_OUTPUT"
- name: Download and extract release HTML
run: |
set -euo pipefail
mkdir -p _site
curl -fsSL "${{ steps.release.outputs.asset-url }}" | tar -xzf - -C _site
- name: AI-Powered Link Checker
uses: QuantEcon/action-link-checker@main
with:
html-path: '_site'
fail-on-broken: 'false'
silent-codes: '403,503'
ai-suggestions: 'true'
create-issue: 'true'