Skip to content

External Link Check #50

External Link Check

External Link Check #50

name: External Link Check
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * MON"
jobs:
external-link-check:
name: External Link Check
runs-on: ubuntu-latest
steps:
- name: Checkout-repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: make deps
working-directory: ./book/website
- name: Build Jupyter-Book
run: make book
working-directory: ./book/website
- name: Restore lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }} # save cache using commit sha
restore-keys: cache-lychee- # restore latest cache (not a specific commit)
- name: Check links
uses: lycheeverse/lychee-action@v1.8.0
with:
args: --config './lychee.toml' --no-progress 'book/website/_build/html/**/*.html'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} # Use runner's GitHub token to avoid rate limiting
- name: Concatenate Lychee output with issue header
run: cat .github/workflows/resources/external_link_check_header.md lychee/out.md > issue_text.md
- name: Update Issue
uses: peter-evans/create-issue-from-file@v4
with:
title: Broken links
issue-number: 3171
content-filepath: issue_text.md
token: ${{secrets.GITHUB_TOKEN}}
labels: |
infrastructure
caretaking