pages*: switch http to https #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check links with Lychee | |
on: ['push', 'pull_request', 'workflow_dispatch'] | |
jobs: | |
check-links: | |
runs-on: ubuntu-latest | |
env: | |
LYCHEE_INPUT_FILE: "links.txt" | |
LYCHEE_OUTPUT_FILE: "lychee/out.md" | |
steps: | |
- name: Restore lychee cache | |
id: restore-cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: .lycheecache | |
key: cache-lychee-${{ github.sha }} | |
restore-keys: cache-lychee- | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- run: | | |
grep -rh "More information: " pages/ | sort -u > ${{ env.LYCHEE_INPUT_FILE }} | |
echo "Checking" $(wc -l < ${{ env.LYCHEE_INPUT_FILE }}) "links" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: links | |
path: ${{ env.LYCHEE_INPUT_FILE }} | |
- name: Lychee URL checker | |
uses: lycheeverse/lychee-action@v1 | |
id: lychee | |
with: | |
jobSummary: false | |
args: >- | |
--cache | |
--verbose | |
--no-progress | |
--accept 100..=103,200..=299,429 | |
--max-concurrency 25 | |
--exclude-all-private | |
${{ env.LYCHEE_INPUT_FILE }} | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Sort failed URLs alphabetically | |
run: python3 scripts/sort-lychee-output.py | |
- name: Upload Lychee output as GitHub Job Summary | |
run: cat ${{ env.LYCHEE_OUTPUT_FILE }} > $GITHUB_STEP_SUMMARY | |
- name: Save lychee cache | |
uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: .lycheecache | |
key: ${{ steps.restore-cache.outputs.cache-primary-key }} |